encode('iso-8859-1') : encode « String « Python Tutorial






locStr = "El "
uniStr = u"Ni\u00F1o"

newStr = locStr+uniStr
print newStr.encode('iso-8859-1')








5.6.encode
5.6.1.encode('iso-8859-1')
5.6.2.encode('utf-8')
5.6.3.encode('utf-16')