String to unicode - duplicating by function the effect of u prefix

CiTro citronelu at
Thu Jun 18 02:54:07 EDT 2009

I'm looking for a way to convert a string to it's unicode "brother".

This means:

stringOne = "\u0026"
stringTwo = u"\u0026"

print unicode(stringOne) == stringTwo

The result is false. What function should I use, to duplicate the
effect of the "u" prefix ?

More information about the Python-list mailing list