How to display chinese character in 65001 in pytohn?

L

length power

I am in win7 +python3.3.

import os
os.system("chcp 936")
fh=open("test.ch","w",encoding="utf-8")
fh.write("ä½ ")
fh.close()
os.system("chcp 65001")
fh=open("test.ch","r",encoding="utf-8").read()
print(fh)
Äãb'\xe4\xbd\xa0'

How can i display the chinese character `ä½ ` in 65001?
 

Ask a Question

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.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top