[Zope] Replacing an unicode string

Florian Reiser florian.reiser at ra-bc.de
Mon Aug 25 12:24:57 EDT 2003


Hi folks,

I have an unicode string:

text = u'ABC<EURO>'

Now I want to do a replacement of the string u'<EURO>' to u'\u20ac'
(this is the euro sign).
When I type

text = text.replace(u'<EURO>', u'\u20ac')

nothing happens, the string is still u'ABC<EURO>'
How can I replace the tag '<EURO>' and insert the euro sign instead?


Regards
Florian Reiser





More information about the Zope mailing list