Chinese language support of Python?

David LeBlanc whisper at oz.net
Sun Jul 7 02:49:28 EDT 2002


This may not be of much help, but Tk, the library behind Tkinter, is quite
popular for displaying Asian languages and there was a substantial body of
work done. Some changes where made to standard Tk to accomodate Asian
language display. You might find it necessary to build a custom version of
Tk for Tkinter to link with and possibly also modify some of the Tkinter
wrapper. You should be able to get more information about Asian language
support in Tk by asking on the comp.lang.tcl newsgroup.

You can also find some good information on Tk at http://www.tcl.tk/.
You can also find a pointer to a "traditional Chinese" page from
http://tcl.sourceforge.net/faqs/tcl/

Then, of course, there's Chinese Python at
http://chinesepython.cosoft.org.cn/cgi-bin/cgb/home.html (in chinese - also
has a Sourceforge page at http://sourceforge.net/projects/chinesepython/ in
english).

There are other links about tkinter and chinese at yahoo - I just entered
tkinter and chinese (without the word "and").

Note: while Tcl is a nice language, I do not suggest you abandon Python for
Tcl, especially if more then basic MS-Windows support is important to you. I
personally think Python might have a speed edge too.

David LeBlanc
Seattle, WA USA

> -----Original Message-----
> From: python-list-admin at python.org
> [mailto:python-list-admin at python.org]On Behalf Of Leon Wang
> Sent: Saturday, July 06, 2002 22:55
> To: python-list at python.org
> Subject: Re: Chinese language support of Python?
>
>
> 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
> --
> http://mail.python.org/mailman/listinfo/python-list






More information about the Python-list mailing list