python3:如何将Unicode编码的字符串转换为字母字符串
在Python3中,如何将“\\u00A9 PNG”转换为“\u00A9 PNG”或“©PNG” 对于Java来说,需要对其进行解码python3:如何将Unicode编码的字符串转换为字母字符串,python,python-3.x,encoding,Python,Python 3.x,Encoding,在Python3中,如何将“\\u00A9 PNG”转换为“\u00A9 PNG”或“©PNG” 对于Java来说,需要对其进行解码 我不知道如何使用Python3。这应该适合您 string = '\\u00A9 PNG' print (string.encode('utf8').decode('unicode-escape')) 输出: ©巴布亚新几内亚
我不知道如何使用Python3。这应该适合您
string = '\\u00A9 PNG'
print (string.encode('utf8').decode('unicode-escape'))
输出:
©巴布亚新几内亚