unicode, filenames and umlaut...

Mark Hammond MarkH at ActiveState.com
Thu Jun 7 19:10:18 EDT 2001


C. Meyer wrote:

> Hm, if the filename contains umlauts, askopenfilename() returns an unicode.
> But print, open and fileinput.input don't like it?


This has been fixed in the CVS version of Python, so should work fine in 
Python 2.2.

> What ist the "correct" solution for this problem?
> A hint may help... (but fn.encode("LATIN-1") don't help)


I don't have Tkinter, so I can't be sure.

However, passing fn.encode('mbcs') _should_ work.  But so should Latin-1.

The thread at 
http://mail.python.org/pipermail/python-dev/2001-March/013702.html may 
be of some help here to understand what is going on...

Mark.




More information about the Python-list mailing list