How can I display unicode in Tk widget

Kick store_li at sina.com
Sat Dec 22 22:15:09 EST 2001


Ok! My little is as follow,
------------------------------------------------------
import odbc
from Tkinter import *

h=odbc.odbc("SQLite")
u=h.cursor()
u.execute("select * from tbl2")
q=u.fetchone()
f=q[0]
print type(f)
print type(q[0])
root=Tk()
g=Label(root,text=f)
e=Text(root)
e.insert(END,q[0])
g.pack()
e.pack()
root.mainloop()
----------------------------------------------------------------
The labe widget g and e can't display my chinese char retrived from sqlite
database.

Could someone help me?

Pls!

Rick
"Martin von Loewis" <loewis at informatik.hu-berlin.de> wrote in message
news:j41yhoo5n1.fsf at informatik.hu-berlin.de...
> "Kick" <store_li at sina.com> writes:
>
> > Would You like tell me what could I do?
>
> No. Not at all. Not with the kind of information that you are providing.
>
> Please post a small snippet of source code you are trying to run, and
> report what software version you are using, and what the snippet does
> when run on your system. Perhaps *then* somebody has grounds to make
> valuable suggestions.
>
> Regards,
> Martin
>





More information about the Python-list mailing list