articles/Review/thewormhasturnedagain-page7
by Mike McNamee Published 01/10/2009
Notes:
Whilst the illegal characters are simply not supported for use by one or more of the OSs to be used, the deprecated characters include those deprecated for naming purposes plus those likely to cause use in a web/ ftp environment.#1. Illegal filename characters: \ (backslash), / (forward slash), : (colon), * (asterisk), ? (question mark), ' (double quotes), < (left angle bracket), > (right angle bracket), | (pipe). Most of these are Windows OS constraints; Mac allows all except a colon (though a forward slash, /, can cause issues for POSIX paths). The aim here is to allow problemfree cross-platform use. An all-Windows or all-Mac organisation may need to interact with others using different OSs, so the safe method is to observe both OS' limitations, even if you mostly/always work on only one OS.
#2. Avoid %, #, and $ as these are commonly used as variable name prefixes, so it can get messy if automating anything with filenames that include these characters. If networking cross platform (e.g. Samba, SMB, CIFS) consider effects of !+{}&[] on path and filename translation.
#2. Where possible avoid spaces in filenames (though not strictly necessary, they can complicate things, especially if scripting).
You are best advised to stick to alphanumerics, underscores,hyphens, periods. Do not use a hyphen or a period as the first or last character of a filename as this can have special meaning on some OSs (e.g. a starting period often indicates the file is hidden or system file that is not displayed to non-admin user accounts).
#2. File/folder delimiters: Mac Classic uses a colon, Mac OS X uses either forward slash (POSIX paths) or colon ('Mac' paths), Unix uses a forward slash and Windows a backslash (plus colon for drive letter). #2 & #9. Deprecated filename & path characters: , (comma), ; (semicolon), (space), • (bullet = ASCII #149), % (percent), & (ampersand).
The 'bullet' character has no special significance but does seem popular as a form of name punctuator amongst some Mac users but it can cause unreadable filenames in a cross-platform environment.
#2 & #9. Unix has few limitations. Filenames may be up to 256 characters. A forward slash (/) is a folder delimiter and a leading period (.) makes that file a system file.
#3 & #4. Windows, Unix and Mac OS X all support long filenames. References conflict as to whether exactly 256 or 255 characters are allowed (in Windows this includes the extension). However, as no current OS will allow you to create a filename exceeding this and all have the same top limit, this is one constraint you are unlikely to have to test for!
#3. Consider the impact of long filenames on their display in OS and program dialogs, web pages etc. For instance Firefox won't wrap long strings of alphanumeric characters (nor can you force it to do so via code) so that long filenames may 'break' web layouts not designed with this issue in mind.
#4. The 'Joliet' standard for Windows CD supporting long filenames has a limit of 64 characters for the total path (folders & filename). If you need deep nesting, use short folder and file names! Also watch for limitations on the depth of folder nesting that can occur with strict observance of ISO9660 (see first bullet in next list). This is something that is rarely explained in CD/DVD burning software and is more likely to bite when using older systems/software. If path length limitations are a likely issue then make sure you test before starting any large body of work.
#5. Whilst modern 32-bit Windows (post Win 95) is will tolerate fileswithout extensions it does not know how to handle them. In addition some apps use the OSs 'knowledge' of file types to help it when finding/opening files - i.e. if the OSs is confused so to will be some apps. Bottom line, if Windows use is likely always have file extensions. OSX usage seems to be drifting towards the extension model now resource fork info is becoming a legacy issue.
#6. Mac, making less deliberate use of extensions allows periods in names. Portfolio will assume the set of characters after the right-most period in the name is the Windows-compatible extension. So if you must have, for example, 'myname.txt.stuff' for a text file, better to call it 'myname. stuff.txt'; Portfolio will read the first as having extension '.stuff', whilst the second will be read as '.txt'.
There are 0 days to get ready for The Society of Photographers Convention and Trade Show at The Novotel London West, Hammersmith ...
which starts on Thursday 1st January 1970