What characters are safe in cross-platform file names for Linux, Windows and OS-X
Problem
Currently, I use a name for most of my files. has spaces converted to underscores. I'd like to use the date format, but I am not sure how to separate it from the name. A would look strange if the name started with a number. If I use a , then it conflicts with the underscore representing a space. What characters are reasonably safe in file names that would work here? I am on Linux, but I might share files with other people (Windows 7, Mac OS X).
Error Output
YYMMDD-NAME+PAGE
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Fix for: What characters are safe in cross-platform file names for Linux, Windows and OS-X
While RedGrittyBrick's answer is technically correct, safety isn't the only issue: usability is also important. I think a better question is "what characters are good to use in a filename". Some potential guidelines: [0-9a-zA-Z_] - Alphanumeric characters and the underscore are always fine to use. and the null byte are problematic on at least one system, and should always be avoided. Spaces are used as argument separators on many systems, so filenames with spaces should be avoided when possible…
Awaiting Verification
Be the first to verify this fix
Sign in to verify this fix