[Python-Dev] Unicode strings as filenames

Neil Hodgson nhodgson@bigpond.net.au
Fri, 4 Jan 2002 08:43:11 +1100


Skip:
> How is this exposed (if at all) to Python programmers?

   Currently not exposed AFAICT except through calldll.

> I happen to be
> developing on Linux, but the eventual delivery platform will be Windows.
Is
> there no way to handle this in a cross-platform way?

   Cross-platform is tricky as the file systems used on Linux have narrow
string file names. Some higher level software (such as the forthcoming
version of GTK+/GNOME) assume file names are encoded in UTF-8 but this is a
somewhat dangerous assumption.

   The problem on Windows is that there are files you can not open by
performing encoding operations on the Unicode names. They do have narrow
generated names, but these are mangled and look like Z8F22~1.HTM so are hard
to discover.

   Neil