Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #44931
| Date | 2013-05-07 21:45 -0400 |
|---|---|
| From | Dave Angel <davea@davea.name> |
| Subject | Re: Making safe file names |
| References | <51895D03.4000300@gmail.com> <518998FE.6030805@davea.name> <mailman.1430.1367974288.3114.python-list@python.org> <Lvydneajg7LXNhTMnZ2dnUVZ_rKdnZ2d@westnet.com.au> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1435.1367977523.3114.python-list@python.org> (permalink) |
On 05/07/2013 09:28 PM, Neil Hodgson wrote: > Andrew Berg: > >> This is not a Unicode issue since (modern) file systems will happily >> accept it. The issue is that certain characters (which are ASCII) are >> not allowed on some file systems: >> \ / : * ? "< > | @ and the NUL character >> The first 9 are not allowed on NTFS, the @ is not allowed on ext3cow, >> and NUL and / are not allowed on pretty much any file system. Locale >> settings and encodings aside, these 11 characters will need to be >> escaped. > > There's also the Windows device name hole. There may be trouble with > artists named 'COM4', 'CLOCK$', 'Con', or similar. > In MSDOS 2, there was a switch that would tell the OS to ignore such names unless they were prefixed by \DEV. But like the switchar switch, it was largely ignored by the ignorant, and probably doesn't exist in current versions of M$OS > http://support.microsoft.com/kb/74496 > http://en.wikipedia.org/wiki/Nul_%28band%29 > > Neil While we're looking for trouble, there's also case insensitivity. Unclear if the user cares, but tom and TOM are the same file in most configurations of NT. -- DaveA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Making safe file names Andrew Berg <bahamutzero8825@gmail.com> - 2013-05-07 19:51 -0500
Re: Making safe file names Neil Hodgson <nhodgson@iinet.net.au> - 2013-05-08 11:28 +1000
Re: Making safe file names Dave Angel <davea@davea.name> - 2013-05-07 21:45 -0400
Re: Making safe file names Roy Smith <roy@panix.com> - 2013-05-07 22:21 -0400
Re: Making safe file names Andrew Berg <bahamutzero8825@gmail.com> - 2013-05-07 21:20 -0500
Re: Making safe file names Andrew Berg <bahamutzero8825@gmail.com> - 2013-05-07 21:06 -0500
Re: Making safe file names Dave Angel <davea@davea.name> - 2013-05-08 00:10 -0400
Re: Making safe file names albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-05-28 13:44 +0000
Re: Making safe file names Chris Angelico <rosuav@gmail.com> - 2013-05-28 23:53 +1000
Re: Making safe file names Grant Edwards <invalid@invalid.invalid> - 2013-05-28 16:03 +0000
Re: Making safe file names Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-05-08 03:40 +0000
Re: Making safe file names Dave Angel <davea@davea.name> - 2013-05-08 00:13 -0400
Re: Making safe file names Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-05-08 04:47 +0000
Re: Making safe file names Andrew Berg <bahamutzero8825@gmail.com> - 2013-05-07 23:49 -0500
csiph-web