I'm programming using Python 3.x. Say I have the following Unicode string:
my_string =' \xed\x95\x9c'
'\xed\x95\x9c'
is actually the UTF-8 byte stream for the Korean character 한
. What's the easiest way to convert my_string
to 한
? my_string.decode('utf-8')
doesn't work because my_string
is a Unicode string, not a byte string.