a question about Chinese characters in a Python Program

est electronixtar at gmail.com
Mon Oct 20 07:32:20 CEST 2008


On Oct 20, 10:48 am, Liang Chen <c... at uga.edu> wrote:
> Hope you all had a nice weekend.
>
> I have a question that I hope someone can help me out. I want to run a Python program that uses Tkinter for the user interface (GUI). The program allows me to type Chinese characters, but neverthelss is unable to show them up on screen. The follow is some of the error message I received after I logged off the program:
>
> "Could not write output: <type "exceptions: UnicodeEncodeError'>, 'ascii' codec can't encode characters in position 0-1: ordinal not in range (128)"
>
> Any suggestion will be appreciated.
>
> Sincerely,
>
> Liang
>
> Liang Chen,Ph.D.
> Assistant Professor
> University of Georgia
> Communication Sciences and Special Education
> 542 Aderhold Hall
> Athens, GA 30602
>
> Phone: 706-542-4566

Personally I call it a serious bug in python, but sadly most of python
community members do not agree
. It may be a internal str() that caused this issue.

https://groups.google.com/group/comp.lang.python/t/ca6ade6b6f5f3052
http://bugs.python.org/issue3648




More information about the Python-list mailing list