how can i write a hello world in chinese with python

kernel1983 kernel1983 at gmail.com
Wed Dec 13 02:40:41 EST 2006


and I tried unicode and utf-8
I tried to both use unicode&utf-8 head just like "\xEF\xBB\xBF" and not
to use

Anyone knows about the setting in the python code file?
Maybe python doesn't know I'm to use chinese?!

On 12月13日, 下午12时47分, "bearsprite" <bearspr... at gmail.com>
wrote:
> try unicode?
>
> "kernel1983 写道:
> "
>
> > I'm try to build a bundle on OS X, so I write a simple python script
> > for a test:
>
> > #!/usr/bin/env python
> > import EasyDialogs
> > EasyDialogs.Message("Hello,Mac!")
>
> > This runs OK,but when I try to replace "Hello,Mac!" with chinese, it
> > can't be display rightly.
> > Then I tried some way else:
>
> > #!/usr/bin/env python
> > import EasyDialogs
> > EasyDialogs.Message("\xe4\xb8\xad")
>
> > It doesn't work!
>
> > As I know mac is unicode based,how can I display chinese on the screen?




More information about the Python-list mailing list