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')".
--
Dieter
_______________________________________________
Zope maillist - [email protected]
http://mail.zope.org/mailman/listinfo/zope
** No cross posts or HTML encoding! **
(Related lists -
http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )