Hey guys,
I need to know which is the best way to convert a list to unicode
list.
Code :
nameStaff = ['Huey', 'Dewey', 'Cộng']
The 3rd element is already unicode character. So whenever I try to convert to Unicode list, got an error message below.
UnicodeDecodeError: ‘ascii’ codec can’t decode byte 0xcc in position 3: ordinal not in range(128)
I search on StackOverFlow but still not find the solution.
Solution 1 :
answer = [unicode(item) for item in x]
Solution 2 :
map(unicode,lst)
The expect result :
nameStaff = [u'Huey', u'Dewey', u'Cộng']
Could you have any idead for this issuse ?