Itai Tavor wrote at 2005-7-26 11:20 +1000:
>Couldn't get it to work, though... not sure why: unicode('\u2013')
>returns u'\\u2013', which is useless.
I know why (now, that you report the problem).
'...' introduces a non unicode string in which "\u" is not recognized.
"\u" is only recognized in unicode strings.
They are introduced by "u'...'".
Thus, instead of "unicode('\u2013').encode('utf-8')", I should
have written "u'\u2013'.encode('utf-8')".
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -