Thanks Martin,

I‘m not using a freemarker template, the struts tags are.

I’ve set the charset meta tag correctly in my jsp page. The issue is with
the freemarker templates the struts tags use. I tried adding the <#setting
locale="da_DK"> setting to the top of the control header template with no
joy.

Z. 
> 
> 
> this is from freemarker code
>  * <li><strong>ContentType</strong> if specified, response uses the specified
>  * Content-type HTTP header. The value may include the charset (e.g.
>  * <tt>"text/html; charset=ISO-8859-1"</tt>).
>  * If not specified, <tt>"text/html"</tt> is used.
>  * If the charset is not specified in this init-param, then the charset
>  * (encoding) of the actual template file will be used (in the response HTTP
> header
>  * and for encoding the output stream). Note that this setting can be
> overridden
>  * on a per-template basis by specifying a custom attribute named
>  * <tt>content_type</tt> in the <tt>attributes</tt> parameter of the
>  * <tt>&lt;#ftl></tt> directive.
>  * </li>
> 
> change the charset meta tag in the .ftl
> <#macro page title>
>   <html>
>   <head>
>     <title>FreeMarker Struts Example - ${title?html}</title>
>     <meta http-equiv="Content-type" content="text/html; charset=ISO-8859-1">
>   </head>
>   <body>
>   </body>
>   </html>
> </#macro>
> 
> http://en.wikipedia.org/wiki/ISO/IEC_8859-1
> Æ <http://en.wikipedia.org/wiki/%C3%86>
> 00C6
> 
> SchutzStaffel Lindholm at door he says we will work at Oswiccim..do you know
> Oswiccum?
> 
> Martin Gainty 
> ______________________________________________
> Jogi és Bizalmassági kinyilatkoztatás/Note de déni et de confidentialité
>  
> Ez az üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük, hogy
> jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának készítése
> nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és semmiféle jogi
> alkalmazhatósága sincs.  Mivel az electronikus üzenetek könnyen
> megváltoztathatóak, ezért minket semmi felelöség nem terhelhet ezen üzenet
> tartalma miatt.
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le
> destinataire prévu, nous te demandons avec bonté que pour satisfaire informez
> l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est
> interdite. Ce message sert à l'information seulement et n'aura pas n'importe
> quel effet légalement obligatoire. Étant donné que les email peuvent
> facilement être sujets à la manipulation, nous ne pouvons accepter aucune
> responsabilité pour le contenu fourni.
> 
> 
> 
> 
> 
>> > Date: Wed, 26 Aug 2009 12:26:09 +1000
>> > Subject: Freemarker Text Encoding Error
>> > From: zo...@sparecreative.com
>> > To: user@struts.apache.org
>> > 
>> > I¹m having trouble displaying Danish text in my forms using the struts tags
>> > and I think it related to an error with how freemarker gets the locale. I¹m
>> > getting a lot of question marks in the text, but if I set the server local
>> > to Danish, all works as expected. Obviously that¹s not a solution as the
>> > other languages also have problems.
>> > 
>> > For example the s:select tag is incorrectly displaying some Danish text. >>
But
>> > if I go in and edit the freemarker template file and change the label
>> > display from ${} notation to one using <@s.property /> tag it works as
>> > expected.
>> > 
>> > Here¹s the details
>> > 
>> > <@s.property value="%{parameters.label}"/> prints the correct text:
>> > 
>> > Hvornår (ca.) begyndte de nuværende rygsmerter eller bensmerter (iskias)?
>> > 
>> > But ${parameters.label?html} prints texts with Œ?¹ substituted for
>> > unsupported characters :
>> > 
>> > Hvorn?r (ca.) begyndte de nuv?rende rygsmerter eller bensmerter (iskias)?
>> > 
>> > 
>> > I can see one solution is to change all the freemarker template files and
>> > replace ${} with <@s.property/>.
>> > 
>> > But I¹m sure there has to be a simpler solution.
>> > 
>> > Please, please help. As at the rate I¹m going I won¹t be needing a haircut
>> > for a while.
>> > 
>> > Z.
> 
> 
> Windows Live: Make it easier for your friends to see what you’re up to on
> Facebook. Find out more.
> <http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:ON:
> WL:en-US:SI_SB_facebook:082009> 

Reply via email to