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