This is an automated email from the ASF dual-hosted git repository. lihan pushed a commit to branch 8.5.x in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push: new 72c262206e Fix BZ 66392 - Change the default value of AccessLogValve's file encoding to UTF-8. 72c262206e is described below commit 72c262206ec61a29439396ba1e3971455f0d0613 Author: lihan <li...@apache.org> AuthorDate: Tue Dec 20 13:33:48 2022 +0800 Fix BZ 66392 - Change the default value of AccessLogValve's file encoding to UTF-8. https://bz.apache.org/bugzilla/show_bug.cgi?id=66392 --- java/org/apache/catalina/valves/AccessLogValve.java | 10 +++++----- webapps/docs/changelog.xml | 4 ++++ webapps/docs/config/valve.xml | 3 +-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/java/org/apache/catalina/valves/AccessLogValve.java b/java/org/apache/catalina/valves/AccessLogValve.java index 5aa090bd3d..12331ebb28 100644 --- a/java/org/apache/catalina/valves/AccessLogValve.java +++ b/java/org/apache/catalina/valves/AccessLogValve.java @@ -150,9 +150,9 @@ public class AccessLogValve extends AbstractAccessLogValve { protected String fileDateFormat = ".yyyy-MM-dd"; /** - * Character set used by the log file. If it is <code>null</code>, the - * system default character set will be used. An empty string will be - * treated as <code>null</code> when this property is assigned. + * Character set used by the log file. If it is <code>null</code>, UTF-8 + * will be used. An empty string will be treated as <code>null</code> + * when this property is assigned. */ protected volatile String encoding = null; @@ -342,7 +342,7 @@ public class AccessLogValve extends AbstractAccessLogValve { /** * Return the character set name that is used to write the log file. * - * @return Character set name, or <code>null</code> if the system default + * @return Character set name, or <code>null</code> if the default * character set is used. */ public String getEncoding() { @@ -644,7 +644,7 @@ public class AccessLogValve extends AbstractAccessLogValve { } } if (charset == null) { - charset = StandardCharsets.ISO_8859_1; + charset = StandardCharsets.UTF_8; } try { diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml index 484306e1d3..674d599cdc 100644 --- a/webapps/docs/changelog.xml +++ b/webapps/docs/changelog.xml @@ -123,6 +123,10 @@ lookups for resources that contained one or more characters in their name that required escaping when used in a URI path. (markt) </fix> + <fix> + <bug>66392</bug>: Change the default value of <code>AccessLogValue</code>'s + file encoding to UTF-8 and update documentation. (lihan) + </fix> </changelog> </subsection> <subsection name="Coyote"> diff --git a/webapps/docs/config/valve.xml b/webapps/docs/config/valve.xml index a6f4f571a2..ce72d991b7 100644 --- a/webapps/docs/config/valve.xml +++ b/webapps/docs/config/valve.xml @@ -165,8 +165,7 @@ <attribute name="encoding" required="false"> <p>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. + to use the default character set. Default value: UTF-8. </p> </attribute> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org