1
我使用Python 3.x进行编程。说我有以下Unicode字符串:Unicode字符串为Unicode字符,Python 3
my_string =' \xed\x95\x9c'
'\xed\x95\x9c'
实际上是韩语字符한
的UTF-8字节流。将my_string
转换为한
的最简单方法是什么? my_string.decode('utf-8')
不起作用,因为my_string
是一个Unicode字符串,而不是字节字符串。