Writing tkinter application with hebrew text
vincent wehren
v.wehren at home.nl
Mon Jun 16 16:40:33 EDT 2003
"Nic" <nicbar at mail.com> schrieb im Newsbeitrag
news:b2b5c45f.0306160913.4579442b at posting.google.com...
> Hi there,
> I am trying to write a Tkinter application that displays the GUI in
> hebrew in Windows.
> 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?
Bare in mind there currently is (AFAIK) no real support for bi-directional
text in Tkinter , so entering
Hebrew into your application - which you might want to do later - might
proof difficult (at best).
However, display should work fine doing something like:
from Tkinter import *
#some hebrew non-unicode string nicked from the MS website which I don't
know what it means but hopefully
#doesn't offend anybody:
hebrew = "ãó äáéú ùì îé÷øåñåôè éùøàì. îöà îéãò àåãåú îåöøéí, úîéëä, àéøåòéí,
äåøãåú, çãùåú åòåã."
u_hebrew = unicode(hebrew, "cp1255")
root = Tk()
label = Label(root, text = u_hebrew)
label.pack()
mainloop()
Regards,
Vincent Wehren
>
> Thanks
> /nic
More information about the Python-list
mailing list