utf-8 to unicode python code example
Example 1: convert \x unicode utf 8 bytes to \u python
>>> '\xc5\x81'.decode('utf-8')
u'\u0141'
Example 2: how to convert utf-16 file to utf-8 in python
with open(ff_name, 'rb') as source_file:
with open(target_file_name, 'w+b') as dest_file:
contents = source_file.read()
dest_file.write(contents.decode('utf-16').encode('utf-8'))