Chinese language support of Python?
Boudewijn Rempt
boud at valdyas.org
Sat Jul 6 15:25:28 EDT 2002
Leon Wang wrote:
> How can enable Chinese language support of Python? In IDLE, even can
> not save the source file if contain any >128 ASCII code charactors. I
> want to set the Window title in Chinese, but the bit7 is masked by
> Tkinter:
> root.title('中文') # this is Chinese
>
Well, this isn't Chinese -- at least not when it arrived at my
server, but probably not even when it originated with you, because
I see your headers advertise ISO-8859-1 as the encoding. It's plain
string that contains an assortment of ampersands, hash marks, semicolons
and numbers in an order that hasn't much meaning.
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.
--
Boudewijn Rempt | http://www.valdyas.org
More information about the Python-list
mailing list