Y
ygao
compile('U"ÖÐ"','c:/test','single')
why is the result different?
a bug or another reason?
why is the result different?
a bug or another reason?
ygao said:why is the result different?
a bug or another reason?
Peter said:How that particular output came to be I don't know, but you should be able
to avoid the confusion by either passing a unicode string to compile() or
specifying the encoding:
u'\u4e2d'
Peter
PS: In and all-UTF-8 environment I would have /expected/ to see
u'\xe4\xb8\xad'
and that's indeed what I get over here:
u'\xe4\xb8\xad'
John said:But it's not an all-UTF-8 environment; his_encoding = 'gb2312' or one
of its heirs/successors![]()
this is what I want!Peter said:How that particular output came to be I don't know, but you should be able
to avoid the confusion by either passing a unicode string to compile() or
specifying the encoding:
u'\u4e2d'
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.