You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2015/04/24 15:20:18 UTC

[Bug 57854] New: Allow customisation of org.apache.coyote.Constants.DEFAULT_CHARACTER_ENCODING

https://bz.apache.org/bugzilla/show_bug.cgi?id=57854

            Bug ID: 57854
           Summary: Allow customisation of
                    org.apache.coyote.Constants.DEFAULT_CHARACTER_ENCODING
           Product: Tomcat 8
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: peter@peterphi.com

When processing UTF-8 data from browsers it is still necessary to use a filter
to call request.setCharacterEncoding("UTF-8") when the browser does not specify
the charset in the request content type.

It should be possible to set the default character encoding in a similar way to
the URIEncoding="UTF-8" attribute being available on Connector (especially
since URIEncoding now defaults to UTF-8 as of Tomcat 8, but query string / form
params are still parsed as ISO-8859-1).

-- 
You are receiving this mail because:
You are the assignee for the bug.

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


[Bug 57854] Allow customisation of org.apache.coyote.Constants.DEFAULT_CHARACTER_ENCODING

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=57854

Christopher Schultz <ch...@christopherschultz.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Christopher Schultz <ch...@christopherschultz.net> ---
Tomcat is behaving per the HTTP spec: if the client does not specify a
Content-Type including a character set, the server is required to assume the
default, which is ISO-8859-1.

If you would like to override Tomcat's spec-compliant behavior, you may either
call request.setCharacterEncoding("UTF-8") yourself, or use the
CharacterEncodingFilter which now ships with Tomcat.

Please see this document for more details:
http://wiki.apache.org/tomcat/FAQ/CharacterEncoding

-- 
You are receiving this mail because:
You are the assignee for the bug.

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