469,353 Members | 2,093 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,353 developers. It's quick & easy.

Re: a question about Chinese characters in a Python Program

Liang Chen 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.
Start with the Unicode HOWTO in the HOWTOs part of the Manual set.

For 2.6
http://docs.python.org/howto/unicode.html
For 3.0, which has been updated in spite of the warning
http://docs.python.org/dev/3.0/howto/unicode.html

Oct 20 '08 #1
0 915

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Posadas, Dennis | last post: by
1 post views Thread by Anthony Liu | last post: by
reply views Thread by Alex Chan | last post: by
8 posts views Thread by pabv | last post: by
19 posts views Thread by many_years_after | last post: by
7 posts views Thread by kernel1983 | last post: by
12 posts views Thread by Steve Howell | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.