Mega Code Archive

 
Categories / Python / Language Basics
 

Use the unicode() function produce a corresponding Unicode string from a specific encoding

#If you have data in a specific encoding and want to produce a corresponding  #Unicode string from it,  #you can use the unicode() function with the encoding name  #as the second argument. print unicode('\xc3\xa4\xc3\xb6\xc3\xbc', 'utf-8')