You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Guy Bashan <gu...@gmail.com> on 2008/06/18 13:21:22 UTC

[MyFaces] Internationalization

Hi,

 

I have configured my application to work with resource bundles and support
internationalization.

I added on the header on each of my jsp page the following line:

<%@ page contentType="text/html;charset=UTF-8" language="java" %>

 

Still, the values posted to my beans when using language other than Hebrew
are corrupted.

Only after adding the following lines in my main filter it seem to be
working fine:

      request.setCharacterEncoding("UTF-8");

      response.setCharacterEncoding("UTF-8");

      response.setContentType("text/html; charset=UTF-8");

 

Am I missing something, or should those lines be executed for each request?

 

Thanks,

Guy.


Re: [MyFaces] Internationalization

Posted by Kenneth Tang <ke...@oracle.com>.
If you are directly accessing the ServletRequest, you will have to make 
the calls.
Kenneth

Hazem Saleh wrote:
> Hi Guy,
>
> AFAIK, yes it should be!
>
> On Wed, Jun 18, 2008 at 2:21 PM, Guy Bashan <guy.bashan@gmail.com 
> <ma...@gmail.com>> wrote:
>
>     Hi,
>
>      
>
>     I have configured my application to work with resource bundles and
>     support internationalization.
>
>     I added on the header on each of my jsp page the following line:
>
>     <%@ page contentType="text/html;charset=UTF-8" language="java" %>
>
>      
>
>     Still, the values posted to my beans when using language other
>     than Hebrew are corrupted.
>
>     Only after adding the following lines in my main filter it seem to
>     be working fine:
>
>           request.setCharacterEncoding("UTF-8");
>
>           response.setCharacterEncoding("UTF-8");
>
>           response.setContentType("text/html; charset=UTF-8");
>
>      
>
>     Am I missing something, or should those lines be executed for each
>     request?
>
>      
>
>     Thanks,
>
>     Guy.
>
>
>
>
> -- 
> Hazem Ahmed Saleh Ahmed
> http://www.jroller.com/page/HazemBlog 

Re: [MyFaces] Internationalization

Posted by Hazem Saleh <ha...@apache.org>.
Hi Guy,

AFAIK, yes it should be!

On Wed, Jun 18, 2008 at 2:21 PM, Guy Bashan <gu...@gmail.com> wrote:

>  Hi,
>
>
>
> I have configured my application to work with resource bundles and support
> internationalization.
>
> I added on the header on each of my jsp page the following line:
>
> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
>
>
>
> Still, the values posted to my beans when using language other than Hebrew
> are corrupted.
>
> Only after adding the following lines in my main filter it seem to be
> working fine:
>
>       request.setCharacterEncoding("UTF-8");
>
>       response.setCharacterEncoding("UTF-8");
>
>       response.setContentType("text/html; charset=UTF-8");
>
>
>
> Am I missing something, or should those lines be executed for each request?
>
>
>
> Thanks,
>
> Guy.
>



-- 
Hazem Ahmed Saleh Ahmed
http://www.jroller.com/page/HazemBlog