Re: write 中文 into c:\t1

2012-01-26 Thread Dave Angel
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??

Re: write 中文 into c:\t1

2012-01-26 Thread MRAB
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