如何将 UTF-8 格式字符 '戗' 转换为十六进制值并将其存储为字符串“0xe6 0x88 0xa7”。
with open(fromFilename, encoding = "ISO-8859-1") as f:
while True:
c = f.read(1)
if not c:
print ("End of file")
break
print ("Read a character: %c", c)
newC = repr(c.encode('utf-8'))
print ("Read a decode character: %c", newC)
newString = newString + newC
这是我的代码。请让我知道出了什么问题。
千巷猫影
C++的输出如何进行格式转换?
如何将chareset=uft-8转换成gbk模式
RSA公钥格式PKCS#1 怎么转换成 PKCS#8?
那如何从动态面板转换为普通原件呢
相关分类