Again encoding problems

Fabio Tranchitella fabio at tranchitella.it
Wed Oct 29 17:20:16 UTC 2008


* 2008-10-29 16:36, Andreas Tille wrote:
> Well, porting to Zope 3 is no option for the moment.  But the fact that
> Zope 2.x shows this trouble is kind of strange - isn't any Python string
> supposed to be UTF-8?  So what is the source of the problem in Zope?

No, a python string is in whatever encoding you want it to be:

    >>> a = 'ò'
    >>> b = a.decode('utf-8').encode('iso-8859-15')
    >>> a != b
    True

Zope 3 only works with unicode strings, and it is way more easier to handle
encoding only in the "output" working with unicode internally.

-- 
Fabio Tranchitella                         http://www.kobold.it
Free Software Developer and Consultant     http://www.tranchitella.it
_____________________________________________________________________
1024D/7F961564, fpr 5465 6E69 E559 6466 BF3D 9F01 2BF8 EE2B 7F96 1564



More information about the pkg-zope-developers mailing list