Dear Dragos and everyone,<br>I have the problem narrowed down to the Apache/Zope connection. I've more or less decided I want to stick with ISO-8859-1 because moving everything to UTF-8 didn't really help me out. All in ISO-8859-1 works fine with Zope stand-alone, but unfortunately Apache needs to bridge it. As of right now, running it through the Apache bridge gives me the following:
<br><br>HTTP/1.1 200 OK<br>Date: Fri, 16 Sep 2005 19:38:27 GMT<br>Server: Zope/(Zope 2.7.4-0, python 2.3.5, freebsd5) ZServer/1.1<br>Content-Type: text/html;charset=utf-8<br>Transfer-Encoding: chunked<br><br>whereas doing it through Zope gives me the following header:
<br><br>HTTP/1.1 200 OK<br>Server: Zope/(Zope 2.7.4-0, python 2.3.5, freebsd5) ZServer/1.1<br>Date: Fri, 16 Sep 2005 19:32:33 GMT<br>Content-Length: 3941<br>Content-Type: text/html; charset=iso-8859-1<br><br>I'm a little bit confused as to why Apache changes the character-set and encoding. My Apache setup for the virual host is this:
<br><br><VirtualHost *:80><br> ServerAdmin <a href="mailto:me@mysite.dk">me@mysite.dk</a><br><br> ProxyPass / <a href="http://localhost:8080/">http://localhost:8080/</a><br> ProxyPassReverse / <a href="http://localhost:8080/">
http://localhost:8080/</a><br><br> DocumentRoot /home/mysite<br> ServerName <a href="http://www.mysite.dk">www.mysite.dk</a><br> ServerAlias <a href="http://mysite.dk">mysite.dk</a><br> ErrorLog /var/log/www.mysite.dk-error_log
<br> CustomLog /var/log/www.mysite.dk-access_log common<br><br> ## proxy_html_module conf<br> ProxyHTMLURLMap <a href="http://localhost:8080">http://localhost:8080</a> <a href="http://www.mysite.dk">http://www.mysite.dk
</a><br> SetOutputFilter proxy-html<br><br> RequestHeader unset Accept-Enconding<br> AddDefaultCharset ISO-8859-1<br> CharsetDefault ISO-8859-1<br><br></VirtualHost><br><br>What am I missing that makes the encoding go UTF-8? Not that it matters, but the HTML also contains
<br><br><META HTTPD_EQUIV="Content-Type" CONTENT="text/html;charset=iso-8859-1" /><br><br>Thanks for all your help so far<br><br>Cheers<br><br> Nik<br><br><div><span class="gmail_quote">On 9/9/05,
<b class="gmail_sendername">Dragos Chirila</b> <<a href="mailto:d.chirila@finsiel.ro">d.chirila@finsiel.ro</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi<br><br>Here are some things you can do to handle your problem. For me, this<br>approach worked just fine.<br><br>1. Your HTML pages must have set the encoding to utf-8. Put this in the<br>HEAD tag of your html pages:<br>
<br> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><br><br>2. For the Root folder add a property named 'management_page_charset' of<br>type 'string' with the value 'utf-8'. In this way the ZMI pages will be
<br>displayed with utf-8 encoding.<br><br>3. Modify your HTML code like this:<br><br> <input name="test:utf8:ustring" /><br><br> If 'test' is also a property of some object, make sure it has 'ustring'
<br>type.<br><br><br>After that the value will be displayed correctly in all pages.<br><br>Note: If your Zope runs over an Apache you must check also the Apache<br>settings (to serve pages utf-8 encoded)<br><br>Hope this will help.
<br><br>Regards,<br>Dragos<br><br><br>Niklas Saers wrote:<br>> Hey guys,<br>> I've installed Zope on a FreeBSD server. My problem domain is very<br>> small: display a list of when people are unavailable, and let people
<br>> update the list. This is all in Danish, and here are come my problems.<br>> Danish has three extra letters not in the ASCII alfabet, three<br>> upper-case and three lower-case. When getting the data from a <input
<br>> name="test" /> where I've written "æ ø å Æ Ø Å", I get: æ ø Ã¥ Æ Ø Ã…<br>><br>> What is the standard way of ensuring that I get the correct data?<br>><br>> I tried writing a little converter, but the string
<br>><br>> tekst = tekst.replace("\xc3\xa6", "ae");<br>><br>> gives me the error *UnicodeDecodeError: **'ascii' codec can't decode<br>> byte 0xc3 in position 0: ordinal not in range(128)*
<br>><br>> Do you have any suggestion on how to overcome these problems?<br>><br>> Cheers<br>><br>> Nik<br>><br>><br>> ------------------------------------------------------------------------
<br>><br>> _______________________________________________<br>> Zope maillist - <a href="mailto:Zope@zope.org">Zope@zope.org</a><br>> <a href="http://mail.zope.org/mailman/listinfo/zope">http://mail.zope.org/mailman/listinfo/zope
</a><br>> ** No cross posts or HTML encoding! **<br>> (Related lists -<br>> <a href="http://mail.zope.org/mailman/listinfo/zope-announce">http://mail.zope.org/mailman/listinfo/zope-announce</a><br>> <a href="http://mail.zope.org/mailman/listinfo/zope-dev">
http://mail.zope.org/mailman/listinfo/zope-dev</a> )<br></blockquote></div><br>