Python UTF-8-Vergleich

a = {"a":"çö"}
b = "çö"
a['a']
>>> '\xc3\xa7\xc3\xb6'

b.decode('utf-8') == a['a']
>>> False

Was ist Los in da?

edit= tut mir Leid, es war mein Fehler. Es ist immer noch Falsch. Ich bin mit Python 2.6 unter Ubuntu 10.04.

InformationsquelleAutor der Frage erkangur | 2010-08-03

Schreibe einen Kommentar