roboyoshi / datacurator-filetree

a standard filetree for /r/datacurator [ and r/datahoarder ]
https://reddit.com/r/datacurator
MIT License
1.47k stars 136 forks source link

List of Forbidden Characters #16

Closed roboyoshi closed 5 years ago

roboyoshi commented 5 years ago

TODO: Compose a List of "forbidden" characters (= avoid chars) from the 3 major OS Systems (Windows, macOS, Linux/UNIX) and include it in one of the basic guidelines for File+Folder naming.

Windows

The following reserved characters:

    < (less than)
    > (greater than)
    : (colon)
    " (double quote)
    / (forward slash)
    \ (backslash)
    | (vertical bar or pipe)
    ? (question mark)
    * (asterisk)

- Integer value zero, sometimes referred to as the ASCII NUL character.
- Characters whose integer representations are in the range from 1 through 31, except for alternate data streams where these characters are allowed. For more information about file streams, see File Streams.
- Any other character that the target file system does not allow.

see: https://superuser.com/a/1112140

macOS:

File separators : (colon) / (forward-slash) \ (backward-slash) You should avoid using colons and slashes in the names of files and folders because some operating systems and drive formats use these characters as directory separators. Consider substituting an underline (_) or dash (-) where would normally like to use a slash or colon in a filename.
Non-alphabetical and non-numerical symbols ¢™$® Non alphanumeric characters may not be supported by all file systems or operating systems, or may be difficult to work with when exported to certain file formats such as EDL, OMF, or XML.
Punctuation marks, parentheses, quotation marks, brackets and operators . , [ ] { } ( ) ! ; " ' * ? < > | These characters are often reserved for special functions in scripting and programming languages.
White space characters such as spaces, tabs, new lines and embedded returns.   Although OS X and Mac OS formatted disks support spaces in filenames, certain processing scripts and applications may not recognize these characters, or may treat your files differently than expected. Consider substituting an underline (_) or dash (-) where you would normally use spaces.

see: https://support.apple.com/en-us/HT202808

linux:

/ (forward slash)
NUL

see: https://stackoverflow.com/a/31976060