python 字符串编码转换

a = 'test'
a.encode('iso-8859-1').decode('gbk')