On 01/26/2012 09:46 PM, contro opinion wrote:
s='\xd6\xd0\xce\xc4'
print s
中文
s1=s.decode('gbk').encode('utf-8')
print s1
涓
file=open('c:\\t1','w')
file.write(s1)
file.close()
> when i open c:\t1,i get 中文 in it,
> how can i write 涓 into c:\t1??
On 27/01/2012 02:46, contro opinion wrote:
|>>> s='\xd6\xd0\xce\xc4'
print s
中文
s1=s.decode('gbk').encode('utf-8')
print s1
涓枃
file=open('c:\\t1','w')
file.write(s1)
file.close()
|
when i open c:\t1,i get 中文 in it,
how can i write 涓枃 into c:\t1??
>>> file.write(p