Writing tkinter application with hebrew text
Martin v. Löwis
martin at v.loewis.de
Mon Jun 16 16:35:05 EDT 2003
nicbar at mail.com (Nic) writes:
> I am using python 2.2 and the pythonwin ide. In the code, I can see
> the hebrew text but the moment the window with a label is displayed, I
> get greek characters. Can someone please tell me how to display hebrew
> in tkinter?
You should make sure you are using Unicode string.
l=Tkinter.Label(text=u"\N{HEBREW LETTER ALEF}\u05d1")
works fine for me. If you want to use a certain encoding (say,
ISO-8859-8), you should do
l=Tkinter.Label(text=unicode(text_encoded_in_8859_8, "iso-8859-8"))
HTH,
Martin
More information about the Python-list
mailing list