My setup is:
Fedora Linux / PHP / Apache
I have a requirement to allow the user to type a filename in their language. Linux creates the file fine in arabic when I was testing.
My question is, what characters and therefore what regex should I be using to validate the filename?
In general: POSIX allows all characters except
\0(null char)/(path separator)Anything goes, so it is really down to what you want to be accepting
If you want the filenames to be portable for Windows too, keep in mind: