If you print each element of the contain_list
, you can see that they got encoded correctly.
If you see the content_list, you'll see only the utf-8
representation.
contain_list = [[u'\u6e2c\u8a66', 'b', 'c'], [u'\u5de5\u4f5c', 'b1', 'c1']]
contain_list = [[x.encode('utf-8') for x in row] for row in contain_list]
print contain_list
for each in contain_list:
for e in each:
print e
[['\xe6\xb8\xac\xe8\xa9\xa6', 'b', 'c'], ['\xe5\xb7\xa5\xe4\xbd\x9c', 'b1', 'c1']]
測試
b
c
工作
b1
c1