Thomas,

The reason this worked is b/c Stripes framework looks up the character 
encoding from the Locale Picker (which in your case gets initialized via 
the param character encoding part  UTF-8  you specified in your web.xml) 
and invokes request.setCharacterEncoding using that value.

Looks like you have dealt with part of the UI / Stripes aspect of this 
problem just fine BUT if you want full UTF-8 there are other moving 
parts such as setting the accept charset on all your JSPs to UTF-8... 
though in the end it depends how far you need to go... .

As such... check out the thread entitled  "UTF8 from form to mySQL" as 
it covers many areas.

--Nikolaos



Thomas Menke wrote:
> Hi @ll,
>
> I just noticed that in the application that I have just started 
> parameter values did not end up correctly in my database if the 
> parameter values contained non-ascii characters (tested with german 
> umlauts). It looks like my browser (Opera) passed the parameter unicode 
> encoded and stripes assumed that it is iso-8859-1 encoded and translated 
> the value to unicode again which of course results in strange symbols ;-).
>
> I eventually found this:
> http://www.stripesframework.org/display/stripes/Localization#Localization-DeterminingtheCharacterEncodingtouse
>
> And added this:
>
> <init-param>
>      <param-name>LocalePicker.Locales</param-name>
>      <param-value>en_US:UTF-8</param-value>
> </init-param>
>
> to my web.xml which resolved the problem in my browser. But I guess that 
> there are plenty of ways to break this solution (such as setting my 
> browser to a different locale).
>
> How can I deal with the problem?
>
> Thanks,
>
> Thomas
>
> ------------------------------------------------------------------------------
> Create and publish websites with WebMatrix
> Use the most popular FREE web apps or write code yourself; 
> WebMatrix provides all the features you need to develop and 
> publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
> _______________________________________________
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>
>   


------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to