inserting Unicode character in dictionary - Python

"Martin v. Löwis" martin at v.loewis.de
Sun Oct 19 20:34:21 CEST 2008


> Well, the if no encoding is declared, it (quite sensibly) assumes UTF-8,
> so for my purposes this boils down to using a UTF-8 editor -- which I
> always do anyway.  But do I still have to put a "u" before my string
> literals in order to have it treated as characters rather than bytes?

Yes.

> I'm hoping that the answer is "no"

Then you need to switch to Python 3.0, when it comes out. Its string
literals denote unicode strings.

Regards,
Martin



More information about the Python-list mailing list