Tkinter and locale

Alex Martelli aleax at aleax.it
Mon Jan 14 10:34:17 EST 2002


"Fredrik Juhlin" <laz at strakt.com> wrote in message
news:mailman.1011020059.313.python-list at python.org...
> On Mon, Jan 14, 2002 at 02:32:22PM +0100, Alex Martelli wrote:
> > Is it Tk, or specifically Tkinter?  AFAIK, the only Python-specific
> > effect of LC_CTYPE is changing a few string functions such as islower,
> > isupper, ... I guess it IS more likely to be Tk underneath - can you
> > test with just Tcl/Tk?
> You're quite right, testing it with Tcl/Tk gives the same result.
>
> I've looked around for more info about this on Tcl/Tk-sites, so far
> without any luck.

http://www.google.com/search?num=20&hl=en&q=LC_CTYPE+tk gives
over 4,000 hits, so it will take a while to look through them:-(.

Many seem to be for old Tk releases, but others seem current,
and offhand it might look like there's some dissent within Tk
developers about how to fix Tk/LC_CTYPE issues.

E.g.,
http://www-jlc.kek.jp/~fujiik/mklinux/Packages/rawhide/SOURCES/tk8.2.2i18n.p
atch
looks somewhat ominous to me.  Not sure if it's only a problem
for multibyte character sets, though.

I wonder if the simplest bypass of this problem might not be
to set LC_CTYPE back to "C" in the environment before first
importing the Tk stuff.  Perhaps as a bug-workaround it might
be temporarily done in Tkinter.py (until/unless the Tk guys
fix it).  I wonder what /F thinks of this...


Alex






More information about the Python-list mailing list