Chinese language support of Python?

Leon Wang guidance_shanghai at yahoo.com.cn
Sun Jul 7 01:54:30 EDT 2002


Hi, I got the Chinese displayed correctly in window title without
change the default encoding in site.py by:

root.title(u'\u4e2d\u6587')

But still can not put Chinese directly as string in source, I can not
live with so much \u... for a whole Chinese sensence/paragraph, it's
impossible to read and edit them :(
However, I can print Chinese string (normal string, without u prefix
and \u codes) in console with command line python.exe. How can I let
Tkinter accept that?

martin at v.loewis.de (Martin v. Loewis) wrote in message news:<m3sn2wvat1.fsf at mira.informatik.hu-berlin.de>...
> Boudewijn Rempt <boud at valdyas.org> writes:
> 
> > > root.title('中文') # this is Chinese
>  [...]
> > If you use _real_ unicode -- for instance 
> >  root.title(u'\u028A\u0288') # no chinese, because of lacking fonts, but IPA
> > then everything works fine -- at least, with my window manager, on my OS.
> 
> It's more likely that the OP meant
> 
> root.title(u'\u4e2d\u6587')
> 
> Regards,
> Martin



More information about the Python-list mailing list