[Python-Dev] Unicode strings as filenames
Skip Montanaro
skip@pobox.com (Skip Montanaro)
Thu, 3 Jan 2002 15:28:16 -0600
Skip> What's the correct way to deal with filenames in a Unicode
Skip> environment? Consider this:
Skip> [Attempts to use encoding]
Neil> On Windows NT/2K/XP the right thing to do is to use the wide char
Neil> open function such as
Neil> _CRTIMP FILE * __cdecl _wfopen(const wchar_t *, const wchar_t *);
Neil> _CRTIMP int __cdecl _wopen(const wchar_t *, int, ...);
Neil> There may also be techniques for doing this on Windows 9x as the
Neil> file system stores Unicode file names but I have never looked into
Neil> this.
How is this exposed (if at all) to Python programmers? 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?
Skip