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

2009-06-19 Thread Vincent
On Jun 18, 3:23 pm, CiTro wrote: > Thank you, Peter. That solved my problem. the another way is, codecs.raw_unicode_escape_decode(stringOne) == stringTwo -- http://mail.python.org/mailman/listinfo/python-list

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

2009-06-19 Thread CiTro
Thank you, Peter. That solved my problem. -- http://mail.python.org/mailman/listinfo/python-list

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

2009-06-18 Thread Peter Otten
CiTro wrote: > 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 ? "\u

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

2009-06-18 Thread CiTro
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 ? -- http://mail.python.org/mailman/listi