<type 'unicode'>

Martin v. Loewis martin at v.loewis.de
Mon May 6 02:54:52 EDT 2002


Michael Gilfix <mgilfix at eecs.tufts.edu> writes:

>   Either the str () function or do something like:
> 
>      string = "%s" %attrib

That is undesirable: it uses the default encoding to convert from the
Unicode string to the byte string, and shouldn't be used. Using
.encode with an explicit specification of the encoding is much better.

Regards,
Martin




More information about the Python-list mailing list