How can I display unicode in Tk widget

Kick store_li at sina.com
Tue Dec 18 23:35:03 EST 2001


I have rename the old FixTk.py and copy what you write into a new file and
named it FixTk.py.

But unfortunately, nothing changed since I replace the FixTk.py.


"Kirill Simonov" <kirill at xyz.donetsk.ua> wrote in message
news:mailman.1008693863.23418.python-list at python.org...
> On Tue, Dec 18, 2001 at 12:19:58PM +0100, Martin von Loewis wrote:
> > On Windows, Tcl doesn't find its encoding database, thus it cannot
> > find out how to convert the Unicode string for display. Setting
> > TCL_LIBRARY may help.
> >
> > It is questionable whether this is a bug in Tcl or Python: It is a bug
> > in Python, for not installing Tcl libraries in a place where Tcl will
> > find them, and it is a bug in Tcl, for not offering an API to tell it
> > a different location for the codecs database.
>
> This is a bug in "Python2*/Lib/lib-tk/FixTk.py".
> Here is the right way to set TCL_LIBRARY.
>
> FixTk.py
> ========
>
> # Do not import _tkinter!
> import sys, os
>
> if not os.environ.has_key('TCL_LIBRARY'):
>     # Tcl is smart enough to check "$TCL_LIBRARY/tclX.Y/../tcl8.3/".
>     tcl_library = os.path.join(sys.prefix, "tcl", "tclX.Y")
>     os.environ['TCL_LIBRARY'] = tcl_library
>
> ========
>
>
> Kirill.
>
>





More information about the Python-list mailing list