I had a bug using fileupload because it uses the platform default character encoding if a character encoding is not specified.
The platform default character encoding has nothing to do with the character encoding the browser uses for the HTTP POST request, as the character encoding used is the one specified in the charset on the webpage. As you may know nowadays the best way to develop an international web application is to use UTF-8 everywhere. So I suggest any of these three options: - deprecate org.apache.commons.fileupload.util.Streams.asString(java.io.InputStream pStream) that uses the platform default character encoding and deprecate not calling org.apache.commons.fileupload.FileUploadBase.setHeaderEncoding(String encoding) by issuing a warning. - use UTF-8 by default in both org.apache.commons.fileupload.util.Streams.asString(java.io.InputStream pStream) and org.apache.commons.fileupload.FileUploadBase.setHeaderEncoding(String encoding) as it is common nowadays. - use the default servlet container character encoding, as used in javax.servlet.ServletRequest.getParameter(String name), in both org.apache.commons.fileupload.util.Streams.asString(java.io.InputStream pStream) and org.apache.commons.fileupload.FileUploadBase.setHeaderEncoding(String encoding) as users expect. Would you consider any of these changes? --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
