In my experience, by far the easiest and simplest solution for this arises when
you just try to find and replace a single instance of a space in urls at a time.
Something like this search/replace pair (I didn't test it):
(\bhref="[^" ]*) ([^"]*\.png")
\1_\2
That example is just for spaces, not accents, and replaces the first occurrence
of a literal space in the url with an underscore.
You can run that with a replace-all op for the first space in each url, and then
hit replace-all again for each additional space, until it says there aren't any,
so eg if urls have no more than 3 spaces each then its 3 replace-all.
This works as long as your search/replace is idempotent, you are replacing with
something different than what you're replacing.
As for accents, you can deal with those with a similar process.
-- Darren