REPOST: Re: How can I display unicode in Tk widget

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


"Kick" <store_li at sina.com> 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")
l.pack()
l.tk.mainloop()

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
using?

Regards,
Martin

========= WAS CANCELLED BY =======:
Path: news.sol.net!spool1-nwblwi.newsops.execpc.com!newsfeeds.sol.net!news-out.visi.com!hermes.visi.com!news.maxwell.syr.edu!feeder.kornet.net!news1.kornet.net!ua4canc3ll3r
From: martin at v.loewis.de (Martin v. Loewis)
Newsgroups: comp.lang.python
Subject: cmsg cancel <m3n1007pl8.fsf at mira.informatik.hu-berlin.de>
Control: cancel <m3n1007pl8.fsf at mira.informatik.hu-berlin.de>
Date: Mon, 31 Dec 2001 04:06:16 GMT
Organization: A poorly-installed InterNetNews site
Lines: 2
Message-ID: <cancel.m3n1007pl8.fsf at mira.informatik.hu-berlin.de>
NNTP-Posting-Host: 211.57.49.2
X-Trace: news2.kornet.net 1009774227 27193 211.57.49.2 (31 Dec 2001 04:50:27 GMT)
X-Complaints-To: usenet at news2.kornet.net
NNTP-Posting-Date: Mon, 31 Dec 2001 04:50:27 +0000 (UTC)
X-No-Archive: yes
X-Unac4ncel: yes
X-Commentary: I love NewsAgent 1.10 and the Sandblaster Cancel Engine Build 74 (19 March 1999)

This message was cancelled from within Mozilla.



More information about the Python-list mailing list