>From: "Merkl, Werner" <[EMAIL PROTECTED]>
>
>Hi,
>
>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.
>
>eg:
>PythonWin 2.2.1 (#34, Apr 15 2002, 09:51:39) [MSC 32 bit (Intel)] on win32.
>Portions Copyright 1994-2001 Mark Hammond ([EMAIL PROTECTED]) - see
>'Help/About PythonWin' for further copyright information.
> >>> abc = u'a:\u03b1\u03b2\u03b3.txt'; print abc
>a:???.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?
No, none of that is the problem. The problem is that your underlying
operating system does not use Unicode. (I am assuming you are using standard
Win2K). If you switch to NT/J you will find your problems vanish.
Assuming this is not a possibility, then you should use JIS or S-JIS to
encode your file names (which only uses UTF-7) rather than UniCode. Your
Win2K file system will understand these names without problem.
Unfortunately, you have (inadvertently?) copyrighted your code, so I can not
pick it apart to show you how to do this.
>Thanks in advance
>
>Regards/Mir freundlichen Grüßen
>Werner Merkl
>
>--
>----------------------------------------------------------------------
>Werner Merkl
>Senior Engineer Software Pre-Installation
>FSC VP BP PRO PI
>Fujitsu Siemens Computers
>Buergermeister-Ulrich-Str. 100
>86199 Augsburg
>Germany
>
>Telephone: +49(0)821 804-3548
>Telefax: +49(0)821 804-3835
>E-mail: mailto: [EMAIL PROTECTED]
>Internet: http://www.fujitsu-siemens.com
>_______________________________________________
>ActivePython mailing list
>[EMAIL PROTECTED]
>To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
>Other options:
> >http://listserv.ActiveState.com/mailman/listinfo/ActivePython
Exu
[EMAIL PROTECTED]
_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com
_______________________________________________
ActivePython mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython