Re: can compile function have a bug?

2006-10-09 Thread ygao
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

Re: can compile function have a bug?

2006-10-09 Thread Peter Otten
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

Re: can compile function have a bug?

2006-10-09 Thread John Machin
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

Re: can compile function have a bug?

2006-10-09 Thread Peter Otten
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

can compile function have a bug?

2006-10-07 Thread ygao
>>> 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