How does unicode() work?

Robert Latest boblatest at yahoo.com
Wed Jan 9 15:02:20 EST 2008


John Machin wrote:

> When mixing unicode strings with byte strings, Python attempts to
> decode the str object to unicode, not encode the unicode object to
> str.

Thanks for the explanation. Of course I didn't want to mix Unicode and Latin 
in one string, my snippet just tried to illustrate the point. I'm new to 
Python -- I came from C, and C gives a rat's ass about encoding. It just 
dumps bytes and that's that.

robert



More information about the Python-list mailing list