How to change codepage (encoding) in Tcl/Tk

Richard.Suchenwirth Richard.Suchenwirth at kst.siemens.de
Thu Jun 21 02:08:45 EDT 2001


"Richard.Suchenwirth" wrote:
> 
> Peteris Martinsons wrote:
> >
> > I have a UI form, written in BeOpen Python 2.1 with Tcl/Tk that has 4
> > text boxes.
> > I want 2 of them to display text in English and 2 in Russian. Is this
> > possible? If Yes, how do I do this? Which is the property to alter?
> 
> In Tcl/Tk, all strings are internally represented as Unicode/UTF-8. This
> extends to text in Tk widgets as well - if you just have at least one
> font that "implements" a certain Unicode, Tk widgets will happily
> display it without any need for configuration.
> So, to put some Russian into a text widget in Tcl, just say
> 
> .t insert end \u0413\u0414\u041F

This thread went for some time by email only, but it led me to hack
together 
"A tiny input manager", http://mini.net/cgi-bin/wikit/1802.html
where you can instruct entry or text widgets that they receive e.g.
Cyrillic (Russian) letters from a straight ASCII keyboard...
-- 
Schoene Gruesse/best regards, Richard Suchenwirth - +49-7531-86 2703
Siemens Dematic AG, PA RC D2, Buecklestr.1-5, 78467 Konstanz,Germany
Personal opinions expressed only unless explicitly stated otherwise.



More information about the Python-list mailing list