Unicode Question

David Pratt fairwinds at eastlink.ca
Mon Jan 9 23:54:55 EST 2006


Hi Max. Many thanks for helping to realize where I was missing the point 
and making this clearer.

Regards,
David

Max Erickson wrote:
> The encoding argument to unicode() is used to specify the encoding of the 
> string that you want to translate into unicode. The interpreter stores 
> unicode as unicode, it isn't encoded...
> 
> 
>>>>unicode('\xbe','cp1252')
> 
> u'\xbe'
> 
>>>>unicode('\xbe','cp1252').encode('utf-8')
> 
> '\xc2\xbe'
> 
> 
> 
> max
> 



More information about the Python-list mailing list