unicode woes
Ulli Stein
mennsimons at gmx.net
Mon Oct 7 12:57:42 EDT 2002
Matt Gerrans wrote:
>> - Never mix byte strings and Unicode strings (unless the byte strings
>> are restricted to bytes <127, perhaps).
>
> Could you elaborate a bit more on this point? I thought this was okay to
> do, since the byte string will be promoted to unicode. For instance:
>
>>>> 'abcd' + u'zyxw'
> u'abcdzyxw'
>
> Is this an acceptible thing to do?
It would be very nice. But since the coercion would take the default
encoding this is not acceptible.
Ulli
More information about the Python-list
mailing list