Asterix wrote:
how could I test that those 2 strings are the same:'séd' (repr is 's\\xc3\\xa9d') u'séd' (repr is u's\\xe9d')
determine what encoding the former string is using (looks like UTF-8), and convert it to Unicode before doing the comparision.
>>> b = 's\xc3\xa9d' >>> u = u's\xe9d' >>> b 's\xc3\xa9d' >>> u u's\xe9d' >>> unicode(b, "utf-8") u's\xe9d' >>> unicode(b, "utf-8") == u True </F> -- http://mail.python.org/mailman/listinfo/python-list