fabien,

take a look at this (taken from
http://day-to-day-stuff.blogspot.com/2008/05/wicket-internationalization.html
) :

Encoding troubles
Fairly unknown to beginning programmers is that you are only allowed
to use ISO-8859-1 encoding in java properties files. If you live in
Europe this is a fairly annoying as many languages have characters
that are not known to ISO-8859-1 (for example the euro symbol €). The
simple workaround is escaping: cree\u00EBr instead of creeër. (I
always use this site to look up the ISO codepoint.)

But imagine you are making a site in Thai! Luckily Wicket can also
read XML property files. Here is a fragment of the Thai properties
that comes with Wicket:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd";>
<properties>
<entry key="Required">ข้อมูลใน ${label} เป็นที่ต้องการ.</entry>
</properties>



so, either you use classic .properties files in ISO-8859-1, looking up
equivalents in http://unicode.coeurlumiere.com/ , or you simply get
rid of the problem with xml files in UTF-8.  in the blog article i
mentioned above there is also a code sample. haven't tested this
though.

je te souhaite bon courage :)

francisco


On Fri, May 30, 2008 at 8:13 PM, Maarten Bosteels
<[EMAIL PROTECTED]> wrote:
> It should *not* be necessary to convert é into &egrave;
> Are you going to convert ALL 'strange' characters that come out of
> your database ?
>
> I am a wicket newbie and I don't know the wicket-way to solve this
> (nor if there is a wicket way)
> but we're using this filter and it works great :
>
>  <!-- this filter will set the CharacterEncoding for all requests to UTF-8 -->
>  <filter>
>    <filter-name>CharacterEncodingFilter</filter-name>
>    
> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
>    <init-param>
>      <param-name>encoding</param-name>
>      <param-value>UTF-8</param-value>
>    </init-param>
>    <init-param>
>      <param-name>forceEncoding</param-name>
>      <param-value>true</param-value>
>    </init-param>
>  </filter>
>
>  <filter-mapping>
>    <filter-name>CharacterEncodingFilter</filter-name>
>    <url-pattern>...</url-pattern>
>
> regards,
> Maarten
>
> On Fri, May 30, 2008 at 4:22 PM, Fabien D. <[EMAIL PROTECTED]> wrote:
>>
>> yes, i see it in the generated code
>>
>> Jonas-21 wrote:
>>>
>>>> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
>>>
>>> does the actual http header also say this? afair having this line in the
>>> html
>>> isn't enough to have contents treated as utf-8
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>>> For additional commands, e-mail: [EMAIL PROTECTED]
>>>
>>>
>>>
>>
>> --
>> View this message in context: 
>> http://www.nabble.com/Problem-with-Stress-tp17556788p17560140.html
>> Sent from the Wicket - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>

Reply via email to