[Tutor] How to display non-ascii charaters on tkinter-made GUIs?

Gregor Lingl glingl@aon.at
Wed, 25 Sep 2002 10:45:31 +0200


This is a multi-part message in MIME format.
--------------070600090508060204070709
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hy Python schrieb:

> Thanks a lot for your fast reply, Gregor.
>
> I have read the documentation you sent to me the first time. But it's 
> not clear to me that what are steps I need to take.

Did you try to put the attached module sitecustomize.py into the
--Python2?-\Lib   -   Directory.  (Where site.py also lives)
It was this what solved my problems.

You may put additional statements of whatever sort into this module
to customize your Python-installation for your needs.
Gregor

>
> Does this 
> (http://www.python.org/doc/current/lib/module-sys.html#l2h-264) mean 
> that I have go into site.py and modify the setdefaultencoding section?
> Is there a way round this?
>
>
> Your help is appreciated.
>
> Hy



--------------070600090508060204070709
Content-Type: text/plain;
 name="sitecustomize.py"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="sitecustomize.py"

import sys, locale
loc = locale.getdefaultlocale()
if loc[1]:
    encoding = loc[1]
if encoding != "ascii":
    sys.setdefaultencoding(encoding)


--------------070600090508060204070709--