Hi all,
Coming back to this issue...
Interestingly... it illustrates yet another difference between the dev mode
and deployed mode.
On the local development server, I have this encoding issue, that when I
upload a form containing a file for the blobstore and a text field, the
field is wrongly encoded, so I have to use a hack to decode as ISO-8951 and
re-encode as UTF-8.
BUT when I deploy my application on Google App Engine, the problem isn't
present there, and my hack wrongly decode/re-encode the text fields.
So locally, I need my hack, and remotely, I don't.
I'm going to have to do some local branching like if (localMode) { ... }
else { ... }
This would be good if we could remove such differences between local and
prod environments.
Guillaume
On Tue, Sep 14, 2010 at 11:40, Guillaume Laforge <[email protected]> wrote:
> Hi Pieter,
>
> Thanks a lot for the pointer!
> Using a specific filter for that purpose seems like a good idea.
>
> As you mentioned it, I've also added the <%@ page pageEncoding="UTF-8"
> contentType="text/html;charset=UTF-8"%> directive too, but it didn't
> change anything.
>
> I've not tried the filter idea yet, as I had a workaround.
> But I've got the feeling I'm missing something somewhere.
> All the knobs I could think of seem to indicate UTF-8 (even what I see
> through the response Jetty sends), so this is really weird.
>
> Perhaps it could be a problem with App Engine's /_ah/upload servlet
> which does something weird with the fields before returning them to my
> own controller.
>
> Guillaume
>
> On Tue, Sep 14, 2010 at 11:24, Pieter Coucke <[email protected]>
> wrote:
> > This is something I have problems with every time I start a new project.
> >
> > Maybe this helps (not sure since you say Jetty already sends it
> correctly):
> >
> http://www.onthoo.com/blog/programming/2005/07/characterencodingfilter.html
> >
> > I also have
> > <%@ tag pageEncoding="UTF-8"%>
> > and
> > <%@ page pageEncoding="UTF-8" contentType="text/html;charset=UTF-8"%>
> > in every tag and page
> >
> > And make sure your pages (jsp, tags) are also encoded in UTF-8.
> >
> > Hope this helps!
>
>
>
> --
> Guillaume Laforge
> Groovy Project Manager
> Head of Groovy Development at SpringSource
> http://www.springsource.com/g2one
>
--
Guillaume Laforge
Groovy Project Manager
Head of Groovy Development at SpringSource
http://www.springsource.com/g2one
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.