DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23255>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23255

FormFile.getFileName() problem in multibyte character file name





------- Additional Comments From [EMAIL PROTECTED]  2004-01-08 07:10 -------
I had a similar problem, but I do not think, it is a Struts bug. 

Investigation: Internet Explorer sometimes does not send the encoding of the 
form data. If there is no encoding in the request, Tomcat uses the default 
encoding of the Java Virtual Machine. In my case (Linux, Sun JVM 1.4.2_02), 
this was ascii. Since many characters are not representable in ascii, they get 
lost.

Solution for me: A Filter that sets the Encoding to the encoding used by my 
pages:

public class EncodingFilter implements Filter
{
    public void doFilter(ServletRequest request, ServletResponse response,
        FilterChain chain) throws IOException, ServletException
    {
        if (request.getCharacterEncoding() == null)
            request.setCharacterEncoding("ISO-8859-1");

        chain.doFilter(request, response);
    }

...

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to