如何将 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-...