Wanted: safe codec for filenames

Torsten Bronger bronger at physik.rwth-aachen.de
Thu Sep 6 02:02:33 EDT 2007


Hallöchen!

Gabriel Genellina writes:

> En Wed, 05 Sep 2007 19:20:45 -0300, Torsten Bronger
> <bronger at physik.rwth-aachen.de> escribi�:
>
>> Torsten Bronger writes:
>>
>>> I'd like to map general unicode strings to safe filename.  I
>>> tried punycode but it is case-sensitive, which Windows is not.
>>> [...]
>>
>> Okay, the following works fine for me:
>
> Nice codec. Altough if one is looking for really portable file
> names, there are additional rules, collected here
> http://www.boost.org/libs/filesystem/doc/portability_guide.htm
> Hard to comply with all the character set rules *and* keep all name
> lengths below the limits.

Yes, and therefore, a *very* careful encoding was not an option.
For my own application, I need long filenames for example.  So I
used a Wikipedia table to find a sensible compromise.

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus
                                      Jabber ID: bronger at jabber.org
                      (See http://ime.webhop.org for ICQ, MSN, etc.)



More information about the Python-list mailing list