[formulator-dev] Re: encoding solutions.
zen at shangri-la.dropbear.id.au
Wed Sep 24 14:33:07 CEST 2003
-----BEGIN PGP SIGNED MESSAGE-----
> I'm considering moving towards a Formulator 2.0 anyway at some point,
> which means we might accept at least the upgrade issue and a bit of
> code breakage. There's also a usability issue though; if you use *any*
> encoding in your page template use Formulator you'd get unicode
errors if I
> made title and description store their data as unicode...
One point is that it will be a pain to support development of
a Formulator that uses Unicode strings for both Zope 2.5- and Zope 2.6+.
Another point is that while Page Templates handle Unicode strings, DTML
pages don't. I think the sanest way to do Unicode properly in Zope at
the moment is to drop support for Zope 2.5 and DTML, but I'm sure not
everyone has that luxury :-)
It may be possible to make TAL.TALInterpreter.FasterStringIO handle
mixing Unicode string and traditional strings sanely. It would involve
replacing the inherited getvalue() method with one that catches the
ASCII encoding exceptions, converting these strings to Unicode strings
(by checking the RESPONSE headers for the expected character encoding,
or using a heuristic method to guess if you're feeling brave).
I haven't tried this yet, and fixing DTML is left as an exercise to the
Stuart Bishop <zen at shangri-la.dropbear.id.au>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (Darwin)
-----END PGP SIGNATURE-----
More information about the formulator-dev