[Python-Dev] Unicode strings as filenames
Neil Hodgson
nhodgson@bigpond.net.au
Fri, 4 Jan 2002 08:20:24 +1100
Skip:
> What's the correct way to deal with filenames in a
> Unicode environment?
> Consider this:
[Attempts to use encoding]
On Windows NT/2K/XP the right thing to do is to use the wide char open
function such as
_CRTIMP FILE * __cdecl _wfopen(const wchar_t *, const wchar_t *);
_CRTIMP int __cdecl _wopen(const wchar_t *, int, ...);
There may also be techniques for doing this on Windows 9x as the file
system stores Unicode file names but I have never looked into this.
Neil