How to patch ZMI to include character encoding
Where do I need to patch Zope source to force it to always include character encoding meta tag in ZMI pages? I need the following tag in every ZMI page: <meta http-equiv="Content-Type" content="text/html; charset=windows-1250" /> -- Milos Prudek
Milos Prudek wrote:
Where do I need to patch Zope source to force it to always include character encoding meta tag in ZMI pages?
I need the following tag in every ZMI page:
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250" />
Hi, have a look at Zope/lib/python/App/dtml/manage_page_header.dtml Maybe you don't need to patch it at all (I didn't tested it, but it should work): Set a string-property in the root-folder of your Zope with: name: manage_page_charset value: windows-1250 Please see also the notes in the file above. Cheers, Maik
Set a string-property in the root-folder of your Zope with:
name: manage_page_charset value: windows-1250
Please see also the notes in the file above.
I have Zope 2.5.1 and it does not support manage_page_charset. Time to upgrade, I guess :-) Thanks, Maik! -- Milos Prudek
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 - -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Sunday, September 14, 2003, at 11:18 PM, Milos Prudek wrote:
Where do I need to patch Zope source to force it to always include character encoding meta tag in ZMI pages?
I need the following tag in every ZMI page:
<meta http-equiv="Content-Type" content="text/html; charset=windows-1250" />
If you are using a modern Zope (2.6+ I think), then you need to set the management_page_charset variable somewhere where manage_page_header can acquire it (eg. creating the management_page_charset property in the Zope root folder's property page and setting it to the string 'windows-1250' should work). If you want to find the relevant bit of magic in the source code, it is lib/python/App/dtml/manage_page_header.dtml (which shows the default is iso-8859-1). - - -- Stuart Bishop <zen@shangri-la.dropbear.id.au> http://shangri-la.dropbear.id.au/ - -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (Darwin) iD8DBQE/ZXV8h8iUz1x5geARAsQIAJ4vzs1rqQBYcuzaDksG+ZxDQPY2ngCgubJ9 CjC6Vfnvt0AT+e/CNZjggvY= =nx/A - -----END PGP SIGNATURE----- - -- Stuart Bishop <zen@shangri-la.dropbear.id.au> http://shangri-la.dropbear.id.au/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (Darwin) iD8DBQE/ZXW8h8iUz1x5geARAu/QAJ9CcqJsON08ZooRd8aL7YtqeSm6XwCfaSzl PL1m6WaI0/F6mHrVQJZMHAY= =8bbd -----END PGP SIGNATURE-----
participants (3)
-
Maik Jablonski -
Milos Prudek -
Stuart Bishop