Is it a good idea to change an inappropriate file name automatically (with a message that "original file name" was changed to "new file name"), or should I request that the user renames the file himself before uploading it again? The latter means more work for the user, but the renamed file on his computer will have the same name as the uploaded file which might be good for future reference.
What to do with non-reserved special characters? http://www.ietf.org/rfc/rfc1738.txt says that
QUOTE
only alphanumerics, the special characters "$-_.+!*'(),", and reserved characters used for their reserved purposes may be used unencoded within a URL
...which I gather means that servers and browsers understand all of these in file names:
CODE
$-_.+!*'(),
...but are there other practical pitfalls with any of them?
What to do with non-ASCII alphabetical characters? I might let the script rename those I can anticipate (e.g. the Swedish letters "å ä ö" can be renamed to "a a o" or "aa ae oe"), but what to do with the rest? Replace all of them them with an "x"? Or, if the script deletes them, what to do if nothing remains of the file name?
Anything else I haven't thought about?
