3 ms·
Microsoft seems to have a fairly comprehensive list: https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx https://msdn.microsoft.com/en-us/library/aa3
by mikeash 10y ago
Microsoft seems to have a fairly comprehensive list:
https://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx https://msdn.microsoft.com/en-us/library/aa365247(VS.85).asp...
They suggest avoiding <>:"/\|?* as well as all ASCII characters 0-31.
ASCII 0 can be really fun. Lots of filesystem APIs deal with NUL-terminated strings (like, all of POSIX) so a zero byte in the middle of your string just truncates it at that point. If you use something that tolerates zero bytes for your UI strings (like NSString on the Mac, maybe C++ UI frameworks dealing with std::string) then the full string may show in the UI and you just mysteriously get a filename that's shorter on disk than what you see on screen.
- outworlder 10y agoASCII 255 used to be fun in the Windows 3.1 days. DOS would handle just fine (displaying whitespace). The Windows Explorer (or whatever it was called back then) would not let you select a directory named like that. Basically this made a directory inaccessible, unless dealing with very tech savvy people.