[UNICODE] Tkinter and Unicode->ISO-8859-1 issues

Valter Ferraz Sanches vfs at mail.com
Thu Jan 10 10:56:40 EST 2002


Hello everybody!

I´m writing a small app that opens and writes text files (is a kind of
rolodex) in Python, using the Tkinter(face).

The fact is: if I open the file at first with the string "áéíóú" for
example, and try to write again the same string or other that contain
latin1 stuff, I´m not capable of reading the text file correctly (I
see the Unicode stuff broken in one byte chars; this way, "ç" becomes
"ç" and so on) in other apps, as "cat" or "emacs", though my app can
show the chars corretly. I noticed that IDLE-0.8 and fetchmailconf
(when they can save the file) have the same problem.

I think it´s a problem between Tcl (which passes UTF-8) and Python,
because the bug (feature?) occurs only when get'ting the contents of
the Text and Entry widgets.

Does anybody have an idea to fix the problem, or, at least, make me
understand why does it happens? Ignacio?

Thanks for your attention. I would be glad if a copy could be sent to
me, because I won´t connect for the 5 next days (i´m going to travel).

Thanks again.

Valter Ferraz Sanches <vfs at mail.com>



More information about the Python-list mailing list