You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by bu...@apache.org on 2006/02/11 17:52:33 UTC

DO NOT REPLY [Bug 34445] - use charsets given by browser for form field encodings

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

http://issues.apache.org/bugzilla/show_bug.cgi?id=34445





------- Additional Comments From niallp@apache.org  2006-02-11 17:52 -------
I need to look more closely at the code, but maybe replacing getString
(encoding) with getString() will do the job, since the Commons DiskFileUpload 
already knows the request's character encoding.

If that doesn't work, then I think we should just use DiskFileItem's getCharSet
() method - it is public, but not part of the FileItem API. However since 
CommonsMultipartRequestHandler always uses DiskFileItem - then using it should 
work, something like...

    String encoding = null;
    if (item instanceof DiskFileItem) {
        ((DiskFileItem)item).getCharSet();
    }
    if (encoding == null) {
        encoding = request.getCharacterEncoding();
    }

I'll try to get back to this later

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org