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=10464>.
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=10464

other than ISO-8859-1 encodings don't work in forms that contain upload fields

           Summary: other than ISO-8859-1 encodings don't work in forms that
                    contain upload fields
           Product: Struts
           Version: 1.0.2 Final
          Platform: All
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: File Upload
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


I try to use windows-1251 encoding in my pages and if the form contains upload
field <html:file/>, fields with non-latin characters are wrong decoded -
result string contains '?' symbols instead of national symbols.

solution:

- org.apache.struts.upload.MultipartIterator

- method: readLine(), last line of the method is:

return new String(bufferByte, 0, bytesRead, "ISO-8859-1");

should be replaced with:

  String encoding = request.getCharacterEncoding();
  if(encoding == null)
    encoding = "ISO-8859-1";
  return new String(bufferByte, 0, bytesRead, encoding);

regards
Maxim Wirt

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

Reply via email to