Problems uploading a file in UTF-8 using Tomcat / Struts
From: Robert Bowen (sygsix_at_gmail.com)
Date: 01/12/05
- Next message: David McDivitt: "Re: compiled JSPs in WebSphere"
- Previous message: Chris Berg: "Opening a document using exec()"
- Next in thread: Dave Glasser: "Re: Problems uploading a file in UTF-8 using Tomcat / Struts"
- Reply: Dave Glasser: "Re: Problems uploading a file in UTF-8 using Tomcat / Struts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 12 Jan 2005 09:00:17 -0800
I am using Struts' FormFile class to upload a text file from a
multipart form.
Everything works fine in Windoze but now that we have installed it in
Linux we are getting an error reading the text file, it says it can't
read it because it is in UTF-8.
We are working in Spanish and as such have characters with accents,
etc. Do I have to tell Tomcat (in the web.xml with the
SetCharacterEncodingFilter filter) to treat the file as ISO-8859-1?
I read that this filter is useful when you have a multipart form with
fields of both type File and normal text fields, so that the normal
text fields are encoded correctly, but that it doesn't affect File
fields. And that in order to upload the file correctly I would need
something like the Jakarta Commons upload utility class. But I imagine
the Struts FormFile uses commons anyway, no?
I've never had to do this for any other application but then again,
anything is possible. Any help much appreciated, this problem is
driving me NUTS!
Thanks,
syg
- Next message: David McDivitt: "Re: compiled JSPs in WebSphere"
- Previous message: Chris Berg: "Opening a document using exec()"
- Next in thread: Dave Glasser: "Re: Problems uploading a file in UTF-8 using Tomcat / Struts"
- Reply: Dave Glasser: "Re: Problems uploading a file in UTF-8 using Tomcat / Struts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|