How can I display unicode in Tk widget

Martin v. Loewis martin at
Sun Dec 30 15:24:51 CET 2001

"Kick" <store_li at> writes:

> Could someone help me?

With the code you have given, it is still difficult to understand your
problem: You fetch the string from the database, but we do not know
what the string is. Could you please modify your program to print the
type and value of f, then modify it to use the value literally,
i.e. without any use of SQLite.

Or, to try this vice versa, please execute the program

import Tkinter
l = Tkinter.Label(text=u"\u5321")

on your system. On my system (Python 2.2 on Windows XP), it displays a
window with a single Chinese character (which I picked arbitrarily,
since I don't speak Chinese). What does that very program do on your
system? If it fails, which Python version and Windows version are you


More information about the Python-list mailing list