Python, unicode, Windows32 and NTFS...

Werner Merkl werner.merkl at
Fri Sep 27 09:05:27 EDT 2002


in my job I have a lot of differnt language to deal with, now including
japan. And we have all these languages on our server (Windows 2000)...
So NTFS uses UNICODE (I think it's 'utf-16').

Python -- at least since version 1.6 -- is supposed to understand
and handle UNICODE. But my experience is, it doesn't support
UNICODE for NTFS file names.

PythonWin 2.2.1 (#34, Apr 15 2002, 09:51:39) [MSC 32 bit (Intel)] on win32.
Portions Copyright 1994-2001 Mark Hammond (mhammond at - see
'Help/About PythonWin' for further copyright information.
>>> abc = u'a:\u03b1\u03b2\u03b3.txt'; print abc
a:???.txt # if you use Pythonwin you should see 'A:alpha beta gamma .txt'
>>> open(abc,'w').write('test')
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
IOError: [Errno 2] No such file or directory: 'a:a\xdf?.txt'

Oops! Does this mean, I have to use VisualBasicScript to handle this????
Or are there any swiches or tools or libs to use UNICODE filesystems?

BTW: It would be fine, to use all that good stuff like walk, isdir, isfile

Thanks in advance

Regards/Mir freundlichen Grüßen
Werner Merkl

Werner Merkl
Senior Engineer Software Pre-Installation
Fujitsu Siemens Computers
Buergermeister-Ulrich-Str. 100
86199 Augsburg

Telephone: +49(0)821 804-3548
Telefax: +49(0)821 804-3835
E-mail: mailto: werner.merkl at

More information about the Python-list mailing list