commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ylva Degerfeldt" <ylva.degerfe...@gmail.com>
Subject Reading unicode characters from a form in multipart/form-data format
Date Tue, 29 Apr 2008 20:22:45 GMT
Hi everyone!

I joined this list in hope of that someone can help me with this problem:

Is there a way to use UTF-8 when reading from form fields with
multipart/form-data format? (I'm using Apache commons
ServletFileUpload so that's why I'm asking on this mailing list.)

I've searched the web for answers and though this seems to be a well
known problem, I haven't found any solution to it.

I have to have a multipart/form-data form because I want the users to
be able to save their names and birthdate on the same jsp page as
where they can upload a (cv) file, so I have to find a solution.

My jsp page has the meta tag attribute charset="UTF-8", the form has
the attribute accept-charset="UTF-8" and in the servlet which receives
this request I do a:

request.setCharacterEncoding("UTF-8");

but none of those things seem to help.

I also tried using the setHeaderEncoding method of the
ServletFileUpload class but that didn't help either. I still receive
Swedish characters as "weird looking characters" and that's not what I
want.

If anyone has a solution to this problem I would be Very grateful!
(Even if the solution means that I have to convert the strings I
receive in some way.)

Thanks in advance,

Ylva

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message