Hello the list, In Zope.conf ( ZOPE 2.7.5-final ) I changed "rest-input-encoding" and "rest-output-encoding" to send "UTF-8" and then restarted the server. But in my webbrowser, the files are always received in "windows-1252". Please, what can I do to receive UTF-8 from ZOPE 2.7.5-final? Best regards. Jean Tinguely. ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
--On Donnerstag, 28. April 2005 12:29 Uhr +0200 Jean@adimp.ch wrote:
Hello the list, In Zope.conf ( ZOPE 2.7.5-final ) I changed "rest-input-encoding" and "rest-output-encoding" to send "UTF-8" and then restarted the server. But in my webbrowser, the files are always received in "windows-1252".
Please give a detailed description how to reproduce the behaviour. -aj
Jean@adimp.ch wrote:
Hello the list, In Zope.conf ( ZOPE 2.7.5-final ) I changed "rest-input-encoding" and "rest-output-encoding" to send "UTF-8" and then restarted the server. But in my webbrowser, the files are always received in "windows-1252".
Do you access zope directly or are you running behind a web server like apache? In the latter you'll have to change the default encoding in the apache config, too. Peter -- _______________________________ Dr. Hagen&Partner GmbH Am Weichselgarten 7 91058 Erlangen Tel: (0049)9131/691-330 Fax: (0049)9131/691-248 _______________________________
Thursday, April 28, 2005, 3:11:01 PM, Peter Eis wrote:
Jean@adimp.ch wrote:
Hello the list, In Zope.conf ( ZOPE 2.7.5-final ) I changed "rest-input-encoding" and "rest-output-encoding" to send "UTF-8" and then restarted the server. But in my webbrowser, the files are always received in "windows-1252".
Do you access zope directly or are you running behind a web server like apache? In the latter you'll have to change the default encoding in the apache config, too.
Out of curiosity: How is that? I would think that Zope creates the whole HTTP response (so including the Content-Type: text/html;charset=utf-8 header). OK, mod proxy and such may change some headers in it, but the Content-Type's charset? The charset is about the HTTP response body, which is surely created inside Zope.
Peter
-- Best regards, Daniel Dekany
Daniel Dekany wrote:
Thursday, April 28, 2005, 3:11:01 PM, Peter Eis wrote:
Jean@adimp.ch wrote:
Hello the list, In Zope.conf ( ZOPE 2.7.5-final ) I changed "rest-input-encoding" and "rest-output-encoding" to send "UTF-8" and then restarted the server. But in my webbrowser, the files are always received in "windows-1252".
Do you access zope directly or are you running behind a web server like apache? In the latter you'll have to change the default encoding in the apache config, too.
Out of curiosity: How is that? I would think that Zope creates the whole HTTP response (so including the Content-Type: text/html;charset=utf-8 header). OK, mod proxy and such may change some headers in it, but the Content-Type's charset? The charset is about the HTTP response body, which is surely created inside Zope.
Right, the page itself will be delivered in uft-8. When we connected directly to zope the encoding was set to utf-8. It's just that if you're using Apache in front of zope the browser switches to the encoding which Apache is set to. After we changed the default character set from ISO-8859-1 to utf-8 the browser automatically changed it's character encoding to utf-8. Peter -- _______________________________ Dr. Hagen&Partner GmbH Am Weichselgarten 7 91058 Erlangen Tel: (0049)9131/691-330 Fax: (0049)9131/691-248 _______________________________
Am Donnerstag, den 28.04.2005, 15:48 +0200 schrieb Daniel Dekany:
Thursday, April 28, 2005, 3:11:01 PM, Peter Eis wrote:
Jean@adimp.ch wrote:
Hello the list, In Zope.conf ( ZOPE 2.7.5-final ) I changed "rest-input-encoding" and "rest-output-encoding" to send "UTF-8" and then restarted the server. But in my webbrowser, the files are always received in "windows-1252".
Do you access zope directly or are you running behind a web server like apache? In the latter you'll have to change the default encoding in the apache config, too.
Out of curiosity: How is that? I would think that Zope creates the whole HTTP response (so including the Content-Type: text/html;charset=utf-8 header). OK, mod proxy and such may change some headers in it, but the Content-Type's charset? The charset is about the HTTP response body, which is surely created inside Zope.
Yes. Its entirely Zopes job. And if you are using pure Zope, you need to set the header in the publish process, e.g. with a python script or something you use for default display. Also you need to set a property manage_page_charset in zopes root to be able to use that encoding in ZMI too. This way you arent storing unicode - only utf-8 as you want to display it. Regards Tino -- Tino Wildenhain <tino@wildenhain.de>
Hello everybody, I change the file "manage.dtml" in ..\python\app\dtml. This is the change I've done: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <title>Zope on &dtml-BASE0;</title> Best regards. Jean Tinguely. Selon Tino Wildenhain <tino@wildenhain.de>:
Am Donnerstag, den 28.04.2005, 15:48 +0200 schrieb Daniel Dekany:
Thursday, April 28, 2005, 3:11:01 PM, Peter Eis wrote:
Jean@adimp.ch wrote:
Hello the list, In Zope.conf ( ZOPE 2.7.5-final ) I changed "rest-input-encoding" and "rest-output-encoding" to send "UTF-8" and then restarted the server. But in my webbrowser, the files are always received in "windows-1252".
Do you access zope directly or are you running behind a web server like apache? In the latter you'll have to change the default encoding in the apache config, too.
Out of curiosity: How is that? I would think that Zope creates the whole HTTP response (so including the Content-Type: text/html;charset=utf-8 header). OK, mod proxy and such may change some headers in it, but the Content-Type's charset? The charset is about the HTTP response body, which is surely created inside Zope.
Yes. Its entirely Zopes job. And if you are using pure Zope, you need to set the header in the publish process, e.g. with a python script or something you use for default display. Also you need to set a property manage_page_charset in zopes root to be able to use that encoding in ZMI too. This way you arent storing unicode - only utf-8 as you want to display it.
Regards Tino
-- Tino Wildenhain <tino@wildenhain.de>
_______________________________________________ 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 )
---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
Am Montag, den 02.05.2005, 09:43 +0200 schrieb Jean@adimp.ch:
Hello everybody, I change the file "manage.dtml" in ..\python\app\dtml. This is the change I've done: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html;charset=utf-8" /> <title>Zope on &dtml-BASE0;</title>
Yes, thats a common problem - true HTTP-headers always override these meta headers. Unfortunately file based approach leaves you and most tools with the meta tags to transport encoding accross different file based tools. In Zope you should simply: <dtml-call expr="RESPONSE.setHeader('content-type','text/html; charset=utf-8')"> somewhere in the header and probably skipp the meta tag (or have it at least the same content) HTH Tino
participants (5)
-
Andreas Jung -
Daniel Dekany -
Jean@adimp.ch -
Peter Eis -
Tino Wildenhain