[Zope] Dynamic output encoding
Jonathan Hobbs
toolkit at magma.ca
Thu Sep 30 10:19:25 EDT 2004
From: "Ralph van den Houdt" <ralph at ezcompany.nl>
> I want to change the output encoding of a DTML Method based on a session
> variable. But unfortunately the code below doesn't work. The client
> Mozilla/IE presents the page as standard ISO-8859-1, even is the meta
> tag is set to ISO-8859-9.
>
> Any suggestions?
>
> Greetings Ralph
>
> <dtml-if "get_session_language_code() == 'tr'">
> <meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-9">
> <dtml-call "RESPONSE.setHeader('Content-Type', 'text/html;
> charset=ISO-8859-9')">
> <dtml-else>
> <meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
> <dtml-call "RESPONSE.setHeader('Content-Type', 'text/html;
> charset=ISO-8859-1')">
> </dtml-if>
Perhaps a silly question, but...
Have you confirmed that your <dtml-if "get_session_language_code() == 'tr'">
is evaluating to TRUE?
Jonathan
More information about the Zope
mailing list