On Sun, 5 May 2002 06:59:53 -0400, "Andreas Jung"

>I think this behaviour is caused by Toby unicode patches
>that were merged into the trunk some time ago. Maybe Toby
>can give an explanation for this behaviour.

Maybe. It would help if the original poster included a traceback to
explain *where* this error was raised. I assume it is line 465 of

The best reference for these changes is currently

>> I just check out the zope from cvs. Then I receive
>> error when update properties.

>>It seems the property
>> menager now try to re-code into unicode, but thinking
>> the input is just latin-1.

Yes. The 'Properties' management page now uses UTF-8, therefore
browsers submit the form response using UTF-8 too. For a 'string'
property, ZPublisher encodes the unicode value that you type as

You will get this error if you type non-latin-1 characters as the
value of a property of type a 'string', 'int', 'float', 'lines', etc.

>> Actually, I have just add
>> to the root of my site the property
>> management_page_charset as utf-8 which the manage page
>> correctly default to utf-8 encoding now.

The default in Zope cvs today is for the majority of management pages
to use "Content-Type;text/html", meaning the browser has to guess at
characer encoding. This is the same as all previous versions of Zope.
We chose this conservative default because some management pages are
not ready to work with unicode. Some management pages (notably
'Properties') override this default by setting a
management_page_charset name in the namespace stack before rendering
<dtml-var manage_page_header>.

Yes, it is possible to add this property to the root of your folder
and override the default for all management pages. I dont recommend

>> But obviously
>> it does not accept chinese. I have also try to add a
>> new property as ustring but also fail.

'ustring' means unicode string. 'ustring' values are *never* latin-1
encoded, so I can not explain this problem.

Hmmm. 'ustring' means you can use non-latin-1 characters in the
property value, but *not* in the property name. Is that a possible

>> Should I need to add chinese / Japanese encoding to
>> python?

No. use 'ustring' and it should 'just work'.

Toby Dickenson

Zope-Dev maillist  -  [EMAIL PROTECTED]
**  No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to