3 ms·
A good basic summary of this would be "don't use anything other than basic ASCII in filenames." There are two very common desktop platforms (OS X, Windows) that
by durin42 18y ago
A good basic summary of this would be "don't use anything other than basic ASCII in filenames." There are two very common desktop platforms (OS X, Windows) that have outright broken filename handling (OS X in particular has really odd rules for storing Unicode in filenames compared to, oh, the world). Anything requiring character encoding in a filename, much like a source code file, is a bag of hurt waiting to happen. I know there have been bugs in Subversion related to filename encoding issues, and it's been controversial in the hg world as well, where the formal solution is to treat filenames as opaque bytes because anything else becomes painful rapidly.
(Unsurprisingly, this problem shows itself in other places. os.listdir() in Python 3 returned Unicode strings, which is full of suck because on a Linux system filenames are bags of bytes, so two files in a directory could very well be in different encodings. Until recently (at least, have not checked recently) os.listdir() would simply silently ignore any file whose name didn't properly decode into a Unicode from the on-disk bytes.)
- yummyfajitas 18y agoQuite right. The simplest solution at the level of version control is this: >hg add PRN Error: cannot add file named "PRN" - will cause cross platform errors. >hg add filename. Error: cannot add file ending with "." - will cause cross platform errors. >hg add "-rf *" Error: files cannot begin with "-" - will cause cross platform errors. Most people will never see these errors.