struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 10464] New: - other than ISO-8859-1 encodings don't work in forms that contain upload fields
Date Thu, 04 Jul 2002 06:31:24 GMT
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: struts-dev@jakarta.apache.org
        ReportedBy: mvirt@mail.ru


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:struts-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-dev-help@jakarta.apache.org>


Mime
View raw message