compare unicode to non-unicode strings

John Machin sjmachin at lexicon.net
Sun Aug 31 09:21:05 EDT 2008


On Aug 31, 11:04 pm, Asterix <aste... at lagaule.org> wrote:
> how could I test that those 2 strings are the same:
>
> 'séd' (repr is 's\\xc3\\xa9d')

No, the repr is 's\xc3\xa9d'.

>
> u'séd' (repr is u's\\xe9d')

No, the repr is u's\xe9d'.

To answer your question:






More information about the Python-list mailing list