On Mon, December 19, 2005 17:44, Andreas Jung wrote:
--On 9. Dezember 2005 10:11:42 -0500 Jim Fulton <jim@zope.com> wrote:
I forgot a very important need:
- Common approach to Unicode
We need to migrate Zope 2 to use a similar strategy. We need
volunteers to brainstorm how this can be done and make one or more proposals. This is likely a prerequisite for finishing the publisher and ZPT work.
I think there are two approaches. Textual content can be produced by nearly every Zope object (and its methods). Content can be composed by the basic Zope functionalities like DTML, ZPT, PyScripts and external methods (in the sense that these functionalities are able to call other objects and their methods).
a) one could enforce all objects to return unicode (which would be a very hard requirement) and possibly break any application hi all! i think, a) is surely the cleaner solution.
actually i always... - inlcude an content-type header and set the charset for all forms to utf8 - use :utf8:ustring/utext/ulines/utokens converters on all forms this way i always have unicode strings in my db. up to now i never had any unicode problems, expect when interfacing external systems and not doing the proper unicode conversion dance there... why not design a migration script that converts all non-ascii strings in the db to unicode strings, based on the default encoding, etc... also just some thoughts :) jürgen herrmann ps: what's especially critical here is code that handles filenames. some filesystems just don't handle unicode filenames, already had some headache there :)
b) convert non-unicode content produced by Zope objects from where they are called (DTMl, ZPT, PyScript, Extmethods) to unicode. This would limit
the number of places where we need to change code. The encoding of the non-unicode content could be from the 'content-type: XXX; charset=XXXX' header
(if set) or as fallback from the configured zpublisher_default_encoding. An object could also set a property "my_output_encoding" (or so)...
just-some-thoughts... -aj
_______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )
_______________________________________________________________________
XLhost.de - eXperts in Linux hosting <<
Jürgen Herrmann Bruderwöhrdstraße 15b, DE-93051 Regensburg Fon: +49 (0)700 XLHOSTDE [0700 95467833] Fax: +49 (0)721 151 463027 WEB: http://www.XLhost.de _______________________________________________________________________
XLhost.de - eXperts in Linux hosting <<
Jürgen Herrmann Bruderwöhrdstraße 15b, DE-93051 Regensburg Fon: +49 (0)700 XLHOSTDE [0700 95467833] Fax: +49 (0)721 151 463027 WEB: http://www.XLhost.de
participants (1)
-
Jürgen Herrmann