[win32] non-ascii/non-english file names: internal usage of file names

Alexander Belchenko bialix at ukr.net
Thu Dec 1 09:47:35 GMT 2005


Jan Hudec пишет:
>>I believe on windows (NT/XP) the real encoding is actually UTF-16, so it
>>shouldn't be a problem there.
> 
> I believe it actually depends on the filesystem type. 

No. I believe it is not:

>>> import sys
>>> sys.getfilesystemencoding()
'mbcs'

> Ie. that they use
> utf-16 on NTFS, but cp<whatever> on FAT. And they have two ways of
> calling syscalls, one using cp<whatever> and another using utf-16.
> But unices certainly do syscalls with whatever is locale, so legacy
> unices do have problem there.

Internally Windows store filenames in mbcs encoding (multi-byte
character set). Even on FAT32. I think it similar to Unicode. So Python
has no problem to work with unicode filenames.

Alexander





More information about the bazaar mailing list