Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Zope: Dev
Non-Latin-1 properties
 

Index | Next | Previous | View Flat


ybastide at wanadoo

Jun 8, 2006, 6:31 AM


Views: 942
Permalink
Non-Latin-1 properties

Hi!

Sorry to beat a dead horse: the ZMI doesn't allow using non-Latin-1
properties.

* properties are stored using the default-zpublisher-encoding (iso-8859-15);
* manage_propertiesForm is input--output'ed using
management_page_charset (UTF-8) ...
* ... but built using join_unicode, which calls PyUnicode_DecodeLatin1.

To see the problem:

* with the default default-zpublisher-encoding (Latin-9),
- set a property's value to '€' (not in Latin-1)
- Save Changes: it will be displayed as '¤' (the corresponding character)
- Save Changes again: 'charmap' codec can't encode character u'\xa4'
in position 0: character maps to <undefined> (because '¤' is not in
(Latin-9).

* with default-zpublisher-encoding set to UTF-8
- set a property's value to '€'
- Save Changes: it will be displayed as '€'
- Save Changes again: it becomes '€'


Note that this has repercussions not only on the ZMI but on other
products, such as GenericSetup.


Some possible fixes:

* do nothing. This will please those wishing to deprecate the ZMI, but
not the rest of us :-)

* rewrite properties.dtml as a ZPT?

* change join_unicode to use either default-zpublisher-encoding or yet
another setting (which would default to Latin-1 to stay compatible)?


Flames, comments?

Thanks!

Yves

_______________________________________________
Zope-Dev maillist - Zope-Dev[at]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 )

Subject User Time
Non-Latin-1 properties ybastide at wanadoo Jun 8, 2006, 6:31 AM
    Re: Non-Latin-1 properties lists at zopyx Jun 8, 2006, 6:38 AM
        Re: Non-Latin-1 properties tino at wildenhain Jun 8, 2006, 6:40 AM
            Re: Non-Latin-1 properties lists at zopyx Jun 8, 2006, 6:54 AM
        Re: Non-Latin-1 properties ybastide at wanadoo Jun 8, 2006, 6:47 AM
            Re: Non-Latin-1 properties ybastide at wanadoo Jun 8, 2006, 8:02 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact lists@gossamer-threads.com
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.