Quote:
Okay, now this is at least starting to make some sense. Is there a library (in Perl or otherwise) that lets me deal with this mess? Ideally, I'd like to take those URLs, decode them, normalize them, see if the actual file matches the name and if not, normalize the other way, and then reencode.

It's not a problem I've ever had to solve, but I imagine ICU can help deal with it.

Quote:
Bonus question: if the file is "named" with one normal form and you ask for it with a different but equivalent normal form, should it open the file or not? Do different filesystems deal with this in different ways?

My guess is that Windows won't, but MacOS will. MacOS lets you mount FAT32 filesystems, so presumably has some code for getting their filenames right.

Peter