Chinese language support of Python?
glace
glace at users.sourceforge.net
Mon Jul 8 05:08:34 EDT 2002
There will not be a GB version for chinesepython. GB support is
invoked by the '-g' flag when you starts the chinesepython
interpreter.
{'-b':"for BIG5(default)", '-g':"for GB"}.
For source files stored with different encodings, "#--GBK--" and
"#--BIG5--" magic comment strings should be place in sources to
indicate the respective encodings used.
Try again ^_^
glace
guidance_shanghai at yahoo.com.cn (Leon Wang) wrote in message news:<d5d388d4.0207070426.114c88de at posting.google.com>...
> I installed ChineseCodecs1.2.0 into lib/encodings, it converts GB2312
> (simplified Chinese) to UTF-8, and I can use this:
>
> root.title(unicode('中文',"eucgb2312_cn"))
>
> Great! I can put whole raw Chinese string in source now!
> Before that, I also tried ChinesePython, a Chinese translation version
> of Python 2.1, it even enabled this:
>
> root.title('中文') #directly put Chinese in normal string! The Best!!
>
> But a little pity, it translated all prompt/error messages into BIG5
> (Traditional Chinese), I can not view them in my GB Windows
> environment, and no GB version available now yet. I have to uninstall
> it and adopted the first solution.
>
> More pity: the "Python GUI" utility -- IDLE, can not handle Chinese
> string in source file(seems bit7 removed), neither the Python2.2.1
> from python.org nor above chinesepython versions. If I open my source
> with IDLE and save back, all Chinese string will be changed, this
> means I cannot use it even for edit. Then, how can I debug the script
> in GUI?
>
> Thanks!
> Leon Wang
>
More information about the Python-list
mailing list