logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Gregory (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LOG4J2-255) Multi-byte character strings are scrambled in log output
Date Wed, 15 May 2013 17:07:16 GMT

    [ https://issues.apache.org/jira/browse/LOG4J2-255?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13658545#comment-13658545
] 

Gary Gregory commented on LOG4J2-255:
-------------------------------------

The fix is not right IMO. 

The goal (unstated, I suppose, so it's just in my head) of getSupportedCharset is to return
a known charset, the one that is passed in, or ... UTF-8 (IMO). UTF-8 is known, the platform
default could be anything.

The change "charset = Charset.defaultCharset()"  just happened to make the test work because
YOUR platform encoding supports JP chars, this will not always be the case, so the test will
fail for some developers.

This is a case where the test should be configured to write to a file (and Console) with a
JP charset. 
                
> Multi-byte character strings are scrambled in log output
> --------------------------------------------------------
>
>                 Key: LOG4J2-255
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-255
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders, Core
>    Affects Versions: 2.0-beta6
>            Reporter: Remko Popma
>            Assignee: Remko Popma
>            Priority: Blocker
>             Fix For: 2.0-beta7
>
>
> When I tried to log a Japanese string the output was scrambled in both the Console and
a log file.
> For example,
> logger.warn("日本語テスト"); // (Japanese test)
> came out as
> 15:07:00.184 [main] WARN  test.JapaneseTest - 譌・譛ャ隱槭ユ繧ケ繝?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message