Peter Otten wrote: >>>> def toiso(s): > ... if isinstance(s, unicode): > ... return u.encode("iso-8859-1") > ... return s > ... >>>> toiso(u) + toiso(s) > 'R\xfcbeR\xfcbe' Oops, that should be: >>> def toiso(t): ... if isinstance(t, unicode): ... return t.encode("iso-8859-1") ... return t ... >>> toiso(u) + toiso(s) 'R\xfcbeR\xfcbe'