Help: Chinese charactor in Tkinter

Martin von Loewis loewis at informatik.hu-berlin.de
Sun Oct 1 05:55:42 EDT 2000


Zhenlei Jia <zj8k at node14.unix.Virginia.EDU> writes:

> I am trying to display Chinese charactor in Tkinter. The following is 
> the code I've tried, but the texts were displied as "?". Had I missed
> somthing, or just I can't do it on my system? I am using MacPython 2.0b1,
> Tcl & Tk 8.3.0 on MacOS 8.6, I have installed Chinese Language Kit, and I
> can display Chinese char in java, also using unicode.

Can you please try this in a plain wish? It appears that Tk somehow
cannot determine that your font indeed supports the character, so it
displays the replacement character instead.

Also, did you try passing unicode strings but no font? Tk should
attempt to analyse all available fonts and find a suitable one.

In any case, if it turns out that Tk itself is not capable of handling
that, I suggest that you contact Ajuba Solutions or some Tk group for
help.

Regards,
Martin



More information about the Python-list mailing list