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 2010/06/21 11:44:02 UTC

DO NOT REPLY [Bug 49478] New: Add encoding parameter to AddDefaultCharSetFilter

https://issues.apache.org/bugzilla/show_bug.cgi?id=49478

           Summary: Add encoding parameter to AddDefaultCharSetFilter
           Product: Tomcat 7
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Catalina
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: felix.schumacher@internetallee.de


AddDefaultCharSetFilter adds a default charset to each request. It assumes
ISO-8859-1 as the default charset.

The attached patch makes it configurable by introducing an "encoding"
parameter. This parameter can take one of two special values "default" or
"system". Every other value will be interpreted as a name of an character set,
e.g "utf-8".

The meaning of the two special values are as follows:

 default: use ISO-8859-1. This value will also be used, if no parameter was
specified, or if it is empty

 system: the jvm will be asked for the default charset. This charset will
usually be set by system locale.

Together with this functional change, there are two minor changes and one
bigger changes hidden. First use of annotation "Override" at overriden methods.
Second use of keyword "static" for the ResponseWrapper, since it has no
reference to outer class. The third and somewhat bigger change is use of
HttpServletResponse#setCharacterEncoding(encoding) instead of manipulating the
content-type.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 49478] Add encoding parameter to AddDefaultCharSetFilter

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

--- Comment #1 from Felix Schumacher <fe...@internetallee.de> 2010-06-21 05:45:21 EDT ---
Created an attachment (id=25623)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=25623)
add encoding parameter to AddDefaultCharsetFilter

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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


DO NOT REPLY [Bug 49478] Add encoding parameter to AddDefaultCharSetFilter

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

Mark Thomas <ma...@apache.org> changed:

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

--- Comment #2 from Mark Thomas <ma...@apache.org> 2010-07-10 17:15:03 EDT ---
Thanks for the patch. I applied a slightly modified version (handles a few edge
cases, added a test case, i18n support, extended FilterBase) to 7.0.x and it
will be included in 7.0.1 onwards.

Thanks again.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- 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