commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Niall Pemberton" <niall.pember...@gmail.com>
Subject Re: [commons-filupload]UTF-8 problem
Date Thu, 16 Mar 2006 13:27:36 GMT
OK I don't use different encodings, but my understanding is that
browsers haven't implemented the HTTP spec properly in this area and
are inconsistent. I believe that one common solution to this problem
is to use a servlet filter to set the character encoding for the
request. For an example see:

http://javawebparts.sourceforge.net/
http://javawebparts.sourceforge.net/javadocs/javawebparts/filter/CharacterEncodingFilter.html

From memory this may also have also been an issue in FileUpload that
was solved in the latest release (i.e. 1.1) so you may need to use
FileUpload 1.1 with such a filter.

http://jakarta.apache.org/site/downloads/downloads_commons-fileupload.cgi

Hopefully if I've got this wrong, someone with more knowledge will
jump in and correct me.

Niall

On 3/16/06, Béres Gábor <beres.gabor@gmail.com> wrote:
> thanks. fileItem.getString("UTF-8") helped, but when i get the uploaded
> file, as a fileItem, it's fileName property is still buggy. It originaly
> contained hungarian characters.
>
>
> 2006/3/14, Béres Gábor <beres.gabor@gmail.com>:
> >
> > Hi!
> >
> > I'm using hungarian characters (eg: éáűúőó) on my multipart form, encoded
> > in UTF-8. My problem is that commons-filupload is unable to recognize these
> > characters. I think it encodes mulitpart data in ISO-8859-1.
> > When i call fileitem.getString(), i get buggy string.
> >
> > Is there any solution?
> >
> > Thanks for any help.
> >
>
Mime
View raw message