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

            Bug ID: 66392
           Summary: AccessLogValue's file encoding does not correspond to
                    the documentation
           Product: Tomcat 8
           Version: 8.5.84
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
          Assignee: dev@tomcat.apache.org
          Reporter: micha...@apache.org
  Target Milestone: ----

This [1] resource says:
encoding: Character set used to write the log file. An empty string means to
use the system default character set. Default value: use the system default
character set.
But the code [2] does ISO-8859-1:
>         if (encoding != null) {
>             try {
>                 charset = B2CConverter.getCharset(encoding);
>             } catch (UnsupportedEncodingException ex) {
>                 log.error(sm.getString(
>                         "accessLogValve.unsupportedEncoding", encoding), ex);
>             }
>         }
>         if (charset == null) {
>             charset = StandardCharsets.ISO_8859_1;
>         }


May java.nio.charset.Charset.defaultCharset() would be better here, no?

Note: I haven't verified with other Tomcat versions, but I guess they have the
same problem.

[1]
https://tomcat.apache.org/tomcat-8.5-doc/config/valve.html#Access_Log_Valve/Attributes
[2]
https://github.com/apache/tomcat/blob/cf2015c1350a3f057182dd4c26c20f68df8b3400/java/org/apache/catalina/valves/AccessLogValve.java#L638-L648

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to