This is unanswerable, since I think you need a blacklist instead of a white list. Think about non English languages and how many characters that you would need to be on your whitelist.
I am wondering if you really need to test with a filename with all permutations. I think that the code saving the file needs to catch when the file cannot be saved and return a clear message. Now you only have just two cases:
- Use a valid filename and save it, verify the file is on disk.
- Use an invalid filename and verify you get the message.
The operating system should handle the saving and figure out if the name is valid or not. Also non allowed characters are operating system depended, you might need multiple lists.
Have a look at these questions:
If you really want to use a filename this is the one I tend to use it looks something like this:
ThisIsAVeryLongFilename abc...xzy1234567890!@నేనుÆды.test.ext
I take multiple characters from different languages (atleast Asian, Europian and Russian) from this UTF-8 test page: http://www.columbia.edu/~kermit/utf8.html