[Zope-dev] Unicode in Zope 2 (ZMI, Archetypes, Plone, Formulator)
Toby Dickenson
tdickenson at geminidataloggers.com
Mon Apr 26 04:55:02 EDT 2004
On Monday 26 April 2004 09:27, Bjorn Stabell wrote:
> While we're all waiting for Zope 3 and Plone 3, I'd like to know what the
> "standard practice" way of using Unicode with Zope 2. In particular, we'd
> like to store all text as Unicode in the ZODB, and have Zope do the
> encoding/decoding as automatically and transparently as possible.
I added most of the Unicode support in core Zope in 2.6. Transparency was my
goal too.
For the applications I was working on at the time this goal was achieved.
Naturally I stopped without converting all the components that I dont use,
and sadly noone has picked up this work in a consistent manner.
> * in PropertyManager you can add ustrings, but since it doesn't add
> :ENCODING to the field names, you get a Unicode error when trying to save
> since it tries to decode the text assuming ASCII (big problem)
It works for me in 2.6. Note that it only adds the :ENCODING after adding your
first unicode property. This is ugly, but necessary for legacy applications
using 8-bit string properties to hold pre-encoded text.
> I suggest this way of dealing with Unicode right now in Zope 2:
good advice.
> None of the above components handles Unicode in this way, but it seems to
> be how the Unicode support in Zope 2 was meant to be used.
That is correct.
--
Toby Dickenson
More information about the Zope-Dev
mailing list