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

Mailing List Archive: Zope: Dev

Non-Latin-1 properties

 

 

Zope dev RSS feed   Index | Next | Previous | View Threaded


ybastide at wanadoo

Jun 8, 2006, 6:31 AM

Post #1 of 6 (936 views)
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 )


lists at zopyx

Jun 8, 2006, 6:38 AM

Post #2 of 6 (904 views)
Permalink
Re: Non-Latin-1 properties [In reply to]

--On 8. Juni 2006 15:31:09 +0200 Yves Bastide <ybastide[at]wanadoo.fr> wrote:

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

huh? How about using the utext and ustring properties?

-aj

--
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: info[at]zopyx.com - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope & Plone development, Consulting


tino at wildenhain

Jun 8, 2006, 6:40 AM

Post #3 of 6 (906 views)
Permalink
Re: Non-Latin-1 properties [In reply to]

Andreas Jung schrieb:
>
>
> --On 8. Juni 2006 15:31:09 +0200 Yves Bastide <ybastide[at]wanadoo.fr> wrote:
>
>> Hi!
>>
>> Sorry to beat a dead horse: the ZMI doesn't allow using non-Latin-1
>> properties.
>>
>
> huh? How about using the utext and ustring properties?
>
they (sorry ;) suck :-) And they arent available in
manage_page_charset=utf8 (for whatever bd reason ;)

Regards
Tino
_______________________________________________
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 )


ybastide at wanadoo

Jun 8, 2006, 6:47 AM

Post #4 of 6 (905 views)
Permalink
Re: Non-Latin-1 properties [In reply to]

Andreas Jung wrote:
>
>
> --On 8. Juni 2006 15:31:09 +0200 Yves Bastide <ybastide[at]wanadoo.fr> wrote:
>
>> Hi!
>>
>> Sorry to beat a dead horse: the ZMI doesn't allow using non-Latin-1
>> properties.
>>
>
> huh? How about using the utext and ustring properties?

Er. Yep, of course you're right. Except that lots of products hardwire
their properties types.

I told this was an ex-horse, anyways :)

>
> -aj


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 )


lists at zopyx

Jun 8, 2006, 6:54 AM

Post #5 of 6 (909 views)
Permalink
Re: Non-Latin-1 properties [In reply to]

--On 8. Juni 2006 15:40:59 +0200 Tino Wildenhain <tino[at]wildenhain.de> wrote:

> Andreas Jung schrieb:
>>
>>
>> --On 8. Juni 2006 15:31:09 +0200 Yves Bastide <ybastide[at]wanadoo.fr>
>> wrote:
>>
>>> Hi!
>>>
>>> Sorry to beat a dead horse: the ZMI doesn't allow using non-Latin-1
>>> properties.
>>>
>>
>> huh? How about using the utext and ustring properties?
>>
> they (sorry ;) suck :-) And they arent available in
> manage_page_charset=utf8 (for whatever bd reason ;)

You have to use 'UTF-8' (everything in uppercase)...the related code in
properties.dtml is just horrible and stupid :-/

-aj


--
ZOPYX Ltd. & Co. KG - Charlottenstr. 37/1 - 72070 Tübingen - Germany
Web: www.zopyx.com - Email: info[at]zopyx.com - Phone +49 - 7071 - 793376
E-Publishing, Python, Zope & Plone development, Consulting


ybastide at wanadoo

Jun 8, 2006, 8:02 AM

Post #6 of 6 (908 views)
Permalink
Re: Non-Latin-1 properties [In reply to]

Yves Bastide wrote:
> Andreas Jung wrote:
>>
>>
>> --On 8. Juni 2006 15:31:09 +0200 Yves Bastide <ybastide[at]wanadoo.fr>
>> wrote:
>>
>>> Hi!
>>>
>>> Sorry to beat a dead horse: the ZMI doesn't allow using non-Latin-1
>>> properties.
>>>
>>
>> huh? How about using the utext and ustring properties?
>
> Er. Yep, of course you're right. Except that lots of products hardwire
> their properties types.
>

... And that string and text properties are encoded using
default-zpublisher-encoding, which is not Latin-1. So in practice
string and text can't much be used for anything but ASCII.

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 )

Zope dev RSS feed   Index | Next | Previous | View Threaded
 
 


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