Hi Yuppie,

Is there any need to support tool settings with other encodings than utf-8 (and ascii as a subset of utf-8)?


I think there is. Take for instance the portal property "title". It could very well be a non-ascii string, and contain accents. It could be (a) an str encoded in some charset, or (b) unicode.

If (a), then we can assume the charset specified by the portal property "default_charset" (with a default of "" meaning "latin-9" maybe), and re-encode to unicode before passing it to the export template.

Export is thus not a problem.

When importing though, we'll have a non-ascii utf-8 string and we have to decide if we're going to decode it to unicode or re-encode it to the default_charset. This has to be done according to the property type (for properties). For non-properties, I guess we could punt and say tough luck.

But I agree that there's no need to pass around an "encoding" attribute, XML is utf-8 and that's it.

Florent



AFAICS there's not even a need for utf-8: Most settings are not visible for users and those that are (like title and description of Actions and type infos) can contain an ascii i18n message id.

But supporting utf-8 would not cost us much extra and might help people who don't use translations.

See also http://www.zope.org/Collectors/CMF/292


For CMFSetup/GenericSetup this would mean:

All 'encoding' parameters, attributes and methods could be removed. The XML files are anyway utf-8 encoded, so there would not be any need to convert strings from one encoding to an other.

(At the moment a hardcoded ascii encoding is passed around everywhere.)


Cheers,

    Yuppie


_______________________________________________
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests



--
Florent Guillaume, Nuxeo (Paris, France)   CTO, Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   [EMAIL PROTECTED]
_______________________________________________
Zope-CMF maillist  -  Zope-CMF@lists.zope.org
http://mail.zope.org/mailman/listinfo/zope-cmf

See http://collector.zope.org/CMF for bug reports and feature requests

Reply via email to