You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Julien Leonard <jl...@gmail.com> on 2007/05/14 11:40:14 UTC
[S2] UTF8 with ajax results
Hello all,
I have a problem with characters encoding in ajax results.
In fact I have a jsp wich displays a Search UI with well encoding labels.
When the search is submited a div is updated thank to the targets attribute
of the submit tag.
The result displayed isn't in UTF-8 !
All my .properties (for label) are encoded in UTF-8, my JSPs too. Adn I put
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> in
each JSPs.
Is anyone had this problem?
Julien Leonard
RE: [S2] UTF8 with ajax results
Posted by LAMY Olivier <Ol...@accor.com>.
Hi,
If you use tiles take care of this https://issues.apache.org/struts/browse/WW-1724 .
--
Olivier
-----Message d'origine-----
De : Julien Leonard [mailto:jl.degetel@gmail.com]
Envoyé : lundi 14 mai 2007 16:44
À : Struts Users Mailing List
Objet : Re: [S2] UTF8 with ajax results
Specify struts.i18n.encoding in the strus.xml doesn't solve the problem.
But I've tried a lot of thing, and I have finally solved the problem.:
If I use a result standart, which forward on a JSP, it doesn't work.
But if I use a tiles result with an empty template, it works.
So, if I want UTF8 specials characters, I must to also use tile for ajax results.
Thanks for your reactivity Musachy.
Julien
2007/5/14, Musachy Barroso < musachy@gmail.com>:
>
> Try setting struts.i18n.encoding in struts.properties or struts.xml
>
> musachy
>
> On 5/14/07, Julien Leonard <jl...@gmail.com> wrote:
> >
> > I've just tried it. And there is the same encoding problem.
> > So you're write, it doesn't come from ajax.
> >
> > I can't put
> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8"
> > /> because there is no header.
> >
> > Where can be the problem?
> >
> > Julien
> >
> > 2007/5/14, Musachy Barroso <mu...@gmail.com>:
> > >
> > > Did you try hitting the action with a regular request, what is the
> > > encoding?
> > > For struts, an ajax request is not different from a regular request.
> > >
> > > musachy
> > >
> > > On 5/14/07, Julien Leonard < jl.degetel@gmail.com> wrote:
> > > >
> > > > Hello all,
> > > >
> > > > I have a problem with characters encoding in ajax results.
> > > > In fact I have a jsp wich displays a Search UI with well
> > > > encoding
> > > labels.
> > > >
> > > > When the search is submited a div is updated thank to the
> > > > targets attribute of the submit tag.
> > > > The result displayed isn't in UTF-8 !
> > > >
> > > > All my .properties (for label) are encoded in UTF-8, my JSPs too.
> Adn
> > I
> > > > put
> > > > <%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"
>
> > %>
> > > in
> > > > each JSPs.
> > > >
> > > > Is anyone had this problem?
> > > >
> > > >
> > > > Julien Leonard
> > > >
> > >
> > >
> > >
> > > --
> > > "Hey you! Would you help me to carry the stone?" Pink Floyd
> > >
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited.
--------------------------------------------------------------------------------------------------------------
Ce message électronique et tous les fichiers joints ainsi que les informations contenues dans ce message ( ci après "le message" ), sont confidentiels et destinés exclusivement à l'usage de la personne à laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées de ce message, sont interdites.
-------------------------------------------------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [S2] UTF8 with ajax results
Posted by Julien Leonard <jl...@gmail.com>.
Specify struts.i18n.encoding in the strus.xml doesn't solve the problem.
But I've tried a lot of thing, and I have finally solved the problem.:
If I use a result standart, which forward on a JSP, it doesn't work.
But if I use a tiles result with an empty template, it works.
So, if I want UTF8 specials characters, I must to also use tile for ajax
results.
Thanks for your reactivity Musachy.
Julien
2007/5/14, Musachy Barroso < musachy@gmail.com>:
>
> Try setting struts.i18n.encoding in struts.properties or struts.xml
>
> musachy
>
> On 5/14/07, Julien Leonard <jl...@gmail.com> wrote:
> >
> > I've just tried it. And there is the same encoding problem.
> > So you're write, it doesn't come from ajax.
> >
> > I can't put
> > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
> > because there is no header.
> >
> > Where can be the problem?
> >
> > Julien
> >
> > 2007/5/14, Musachy Barroso <mu...@gmail.com>:
> > >
> > > Did you try hitting the action with a regular request, what is the
> > > encoding?
> > > For struts, an ajax request is not different from a regular request.
> > >
> > > musachy
> > >
> > > On 5/14/07, Julien Leonard < jl.degetel@gmail.com> wrote:
> > > >
> > > > Hello all,
> > > >
> > > > I have a problem with characters encoding in ajax results.
> > > > In fact I have a jsp wich displays a Search UI with well encoding
> > > labels.
> > > >
> > > > When the search is submited a div is updated thank to the targets
> > > > attribute
> > > > of the submit tag.
> > > > The result displayed isn't in UTF-8 !
> > > >
> > > > All my .properties (for label) are encoded in UTF-8, my JSPs too.
> Adn
> > I
> > > > put
> > > > <%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"
>
> > %>
> > > in
> > > > each JSPs.
> > > >
> > > > Is anyone had this problem?
> > > >
> > > >
> > > > Julien Leonard
> > > >
> > >
> > >
> > >
> > > --
> > > "Hey you! Would you help me to carry the stone?" Pink Floyd
> > >
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
Re: [S2] UTF8 with ajax results
Posted by Musachy Barroso <mu...@gmail.com>.
Try setting struts.i18n.encoding in struts.properties or struts.xml
musachy
On 5/14/07, Julien Leonard <jl...@gmail.com> wrote:
>
> I've just tried it. And there is the same encoding problem.
> So you're write, it doesn't come from ajax.
>
> I can't put
> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
> because there is no header.
>
> Where can be the problem?
>
> Julien
>
> 2007/5/14, Musachy Barroso <mu...@gmail.com>:
> >
> > Did you try hitting the action with a regular request, what is the
> > encoding?
> > For struts, an ajax request is not different from a regular request.
> >
> > musachy
> >
> > On 5/14/07, Julien Leonard <jl...@gmail.com> wrote:
> > >
> > > Hello all,
> > >
> > > I have a problem with characters encoding in ajax results.
> > > In fact I have a jsp wich displays a Search UI with well encoding
> > labels.
> > >
> > > When the search is submited a div is updated thank to the targets
> > > attribute
> > > of the submit tag.
> > > The result displayed isn't in UTF-8 !
> > >
> > > All my .properties (for label) are encoded in UTF-8, my JSPs too. Adn
> I
> > > put
> > > <%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"
> %>
> > in
> > > each JSPs.
> > >
> > > Is anyone had this problem?
> > >
> > >
> > > Julien Leonard
> > >
> >
> >
> >
> > --
> > "Hey you! Would you help me to carry the stone?" Pink Floyd
> >
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
Re: [S2] UTF8 with ajax results
Posted by Julien Leonard <jl...@gmail.com>.
I've just tried it. And there is the same encoding problem.
So you're write, it doesn't come from ajax.
I can't put
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
because there is no header.
Where can be the problem?
Julien
2007/5/14, Musachy Barroso <mu...@gmail.com>:
>
> Did you try hitting the action with a regular request, what is the
> encoding?
> For struts, an ajax request is not different from a regular request.
>
> musachy
>
> On 5/14/07, Julien Leonard <jl...@gmail.com> wrote:
> >
> > Hello all,
> >
> > I have a problem with characters encoding in ajax results.
> > In fact I have a jsp wich displays a Search UI with well encoding
> labels.
> >
> > When the search is submited a div is updated thank to the targets
> > attribute
> > of the submit tag.
> > The result displayed isn't in UTF-8 !
> >
> > All my .properties (for label) are encoded in UTF-8, my JSPs too. Adn I
> > put
> > <%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
> in
> > each JSPs.
> >
> > Is anyone had this problem?
> >
> >
> > Julien Leonard
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
Re: [S2] UTF8 with ajax results
Posted by Musachy Barroso <mu...@gmail.com>.
Did you try hitting the action with a regular request, what is the encoding?
For struts, an ajax request is not different from a regular request.
musachy
On 5/14/07, Julien Leonard <jl...@gmail.com> wrote:
>
> Hello all,
>
> I have a problem with characters encoding in ajax results.
> In fact I have a jsp wich displays a Search UI with well encoding labels.
>
> When the search is submited a div is updated thank to the targets
> attribute
> of the submit tag.
> The result displayed isn't in UTF-8 !
>
> All my .properties (for label) are encoded in UTF-8, my JSPs too. Adn I
> put
> <%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %> in
> each JSPs.
>
> Is anyone had this problem?
>
>
> Julien Leonard
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd