Hi

Here are some things you can do to handle your problem. For me, this approach worked just fine.


1. Your HTML pages must have set the encoding to utf-8. Put this in the HEAD tag of your html pages:

        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

2. For the Root folder add a property named 'management_page_charset' of type 'string' with the value 'utf-8'. In this way the ZMI pages will be displayed with utf-8 encoding.

3. Modify your HTML code like this:

        <input name="test:utf8:ustring" />

If 'test' is also a property of some object, make sure it has 'ustring' type.


After that the value will be displayed correctly in all pages.

Note: If your Zope runs over an Apache you must check also the Apache settings (to serve pages utf-8 encoded)

Hope this will help.

Regards,
Dragos


Niklas Saers wrote:
Hey guys,
I've installed Zope on a FreeBSD server. My problem domain is very small: display a list of when people are unavailable, and let people update the list. This is all in Danish, and here are come my problems. Danish has three extra letters not in the ASCII alfabet, three upper-case and three lower-case. When getting the data from a <input name="test" /> where I've written "æ ø å Æ Ø Å", I get: æ ø Ã¥ Æ Ø Ã…

What is the standard way of ensuring that I get the correct data?

I tried writing a little converter, but the string

tekst = tekst.replace("\xc3\xa6", "ae");

gives me the error *UnicodeDecodeError: **'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128)*

Do you have any suggestion on how to overcome these problems?

Cheers

   Nik


------------------------------------------------------------------------

_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to