Peter Otten wrote:
> ygao wrote:
>
> compile('U"中"','c:/test','single')
> >
> d=compile('U"中"','c:/test','single')
> d
> >
> exec(d)
> > u'\xd6\xd0'
> U"中"
> > u'\u4e2d'
>
> >
> > why is the result different?
> > a bug or another reason?
>
> How that particular outp
John Machin wrote:
> But it's not an all-UTF-8 environment; his_encoding = 'gb2312' or one
> of its heirs/successors :-)
Ouch. Almost understanding a problem hurts more than not understanding it at
all. I just had a refresher of the experience...
Peter
--
http://mail.python.org/mailman/listinfo
Peter Otten wrote:
> ygao wrote:
>
> compile('U"中"','c:/test','single')
> >
> d=compile('U"中"','c:/test','single')
> d
> >
> exec(d)
> > u'\xd6\xd0'
> U"中"
> > u'\u4e2d'
>
> >
> > why is the result different?
> > a bug or another reason?
>
> How that particular outp
ygao wrote:
compile('U"中"','c:/test','single')
>
d=compile('U"中"','c:/test','single')
d
>
exec(d)
> u'\xd6\xd0'
U"中"
> u'\u4e2d'
>
> why is the result different?
> a bug or another reason?
How that particular output came to be I don't know, but you should be able
>>> compile('U"中"','c:/test','single')
>>> d=compile('U"中"','c:/test','single')
>>> d
>>> exec(d)
u'\xd6\xd0'
>>> U"中"
u'\u4e2d'
>>>
why is the result different?
a bug or another reason?
--
http://mail.python.org/mailman/listinfo/python-list