Making safe file names

Albert van der Horst albert at spenarnc.xs4all.nl
Tue May 28 09:44:10 EDT 2013


In article <Lvydneajg7LXNhTMnZ2dnUVZ_rKdnZ2d at westnet.com.au>,
Neil Hodgson  <nhodgson at iinet.net.au> 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.
>
>http://support.microsoft.com/kb/74496

That applies to MS-DOS names. God forbid that this still holds on more modern
Microsoft operating systems?

>http://en.wikipedia.org/wiki/Nul_%28band%29
>
>    Neil
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert at spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst




More information about the Python-list mailing list