byte count unicode string

Paul Rubin http
Fri Sep 22 13:10:13 CEST 2006

willie <willie at> writes:

>  >>> ustr = buf.decode('UTF-8')
>  >>> type(ustr)
> <type 'unicode'>
> Is it a "unicode object that contains a UTF-8 encoded
> string object?"

No, it's just unicode, which is a string over a certain character set.
UTF-8 is a way to encode unicode strings as byte strings.

You should read the wikipedia article about unicode, it will help you

More information about the Python-list mailing list