Thank you Mark,
that works.
Firstly using 'string-escape' to decode the content is the key
point,so I can get the Chinese characters now.
Regards,
-higer
--
http://mail.python.org/mailman/listinfo/python-list
"higer" wrote in message
news:0c786326-1651-42c8-ba39-4679f3558...@r13g2000vbr.googlegroups.com...
On Jun 7, 11:25 pm, John Machin wrote:
On Jun 7, 10:55 pm, higer wrote:
> My file contains such strings :
> \xe6\x97\xa5\xe6\x9c\x9f\xef\xbc\x9a
Are you sure? Does that occupy 9 bytes in
John Machin wrote:
> On Jun 8, 12:13 am, "R. David Murray" wrote:
> > higer wrote:
> > > My file contains such strings :
> > > \xe6\x97\xa5\xe6\x9c\x9f\xef\xbc\x9a
> >
> > If those bytes are what is in the file (and it sounds like they are),
> > then the data in your file is not in UTF8 encoding
On Jun 8, 8:20 am, MRAB wrote:
> John Machin wrote:
> > On Jun 8, 12:13 am, "R. David Murray" wrote:
> >> higer wrote:
> >>> My file contains such strings :
> >>> \xe6\x97\xa5\xe6\x9c\x9f\xef\xbc\x9a
> >> If those bytes are what is in the file (and it sounds like they are),
> >> then the data in
On Jun 7, 11:25 pm, John Machin wrote:
> On Jun 7, 10:55 pm, higer wrote:
>
> > My file contains such strings :
> > \xe6\x97\xa5\xe6\x9c\x9f\xef\xbc\x9a
>
> Are you sure? Does that occupy 9 bytes in your file or 36 bytes?
>
It was saved in a file, so it occupy 36 bytes. If I just use a
variabl
On Jun 8, 10:20 am, MRAB wrote:
> John Machin wrote:
> > On Jun 8, 12:13 am, "R. David Murray" wrote:
> >> higer wrote:
> >>> My file contains such strings :
> >>> \xe6\x97\xa5\xe6\x9c\x9f\xef\xbc\x9a
> >> If those bytes are what is in the file (and it sounds like they are),
> >> then the data i
John Machin wrote:
On Jun 8, 12:13 am, "R. David Murray" wrote:
higer wrote:
My file contains such strings :
\xe6\x97\xa5\xe6\x9c\x9f\xef\xbc\x9a
If those bytes are what is in the file (and it sounds like they are),
then the data in your file is not in UTF8 encoding, it is in ASCII
encoded a
On Jun 8, 12:13 am, "R. David Murray" wrote:
> higer wrote:
> > My file contains such strings :
> > \xe6\x97\xa5\xe6\x9c\x9f\xef\xbc\x9a
>
> If those bytes are what is in the file (and it sounds like they are),
> then the data in your file is not in UTF8 encoding, it is in ASCII
> encoded as hexi
On Jun 7, 10:55 pm, higer wrote:
> My file contains such strings :
> \xe6\x97\xa5\xe6\x9c\x9f\xef\xbc\x9a
Are you sure? Does that occupy 9 bytes in your file or 36 bytes?
>
> I want to read the content of this file and transfer it to the
> corresponding gbk code,a kind of Chinese character encod
higer wrote:
> My file contains such strings :
> \xe6\x97\xa5\xe6\x9c\x9f\xef\xbc\x9a
If those bytes are what is in the file (and it sounds like they are),
then the data in your file is not in UTF8 encoding, it is in ASCII
encoded as hexidecimal escape codes.
> I want to read the content of this
My file contains such strings :
\xe6\x97\xa5\xe6\x9c\x9f\xef\xbc\x9a
I want to read the content of this file and transfer it to the
corresponding gbk code,a kind of Chinese character encode style.
Everytime I was trying to transfer, it will output the same thing no
matter which method was used.
I
11 matches
Mail list logo