You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Béres Gábor <be...@gmail.com> on 2006/03/14 15:43:36 UTC
[commons-filupload]UTF-8 problem
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.
Re: [commons-filupload]UTF-8 problem
Posted by Béres Gábor <be...@gmail.com>.
It is IE6. I have <META HTTP-EQUIV="Content-Type" CONTENT="text/html;
charset=UTF-8"> tag in my jsp pages.
2006/3/19, Béres Gábor <be...@gmail.com>:
>
> Thanks for the information, but i'm already using such an encoder filter.
> I think the problem is something else.
>
>
> 2006/3/16, Béres Gábor < beres.gabor@gmail.com>:
> >
> > 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 <be...@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.
> > >
> >
> >
>
Re: [commons-filupload]UTF-8 problem
Posted by Martin Cooper <ma...@apache.org>.
Are you telling the browser that it has / should send UTF-8? That is, do you
have this on your page?
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
--
Martin Cooper
On 3/19/06, Béres Gábor <be...@gmail.com> wrote:
>
> Thanks for the information, but i'm already using such an encoder filter.
> I think the problem is something else.
>
>
> 2006/3/16, Béres Gábor <be...@gmail.com>:
> >
> > 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 <be...@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.
> > >
> >
> >
>
Re: [commons-filupload]UTF-8 problem
Posted by Béres Gábor <be...@gmail.com>.
Thanks for the information, but i'm already using such an encoder filter.
I think the problem is something else.
2006/3/16, Béres Gábor <be...@gmail.com>:
>
> 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 <be...@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.
> >
>
>
Re: [commons-filupload]UTF-8 problem
Posted by Niall Pemberton <ni...@gmail.com>.
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 <be...@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 <be...@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.
> >
>
Re: [commons-filupload]UTF-8 problem
Posted by Béres Gábor <be...@gmail.com>.
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 <be...@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.
>
Re: [commons-filupload]UTF-8 problem
Posted by Niall Pemberton <ni...@gmail.com>.
fileitem.getString("UTF-8");
Niall
On 3/14/06, Béres Gábor <be...@gmail.com> wrote:
> 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.
>