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

Remko Popma commented on LOG4J2-255:
------------------------------------

1. I have to eat humble pie here and admit you are completely right about the 
source file encoding being irrelevant. The JVM has a unicode string in memory. 
I think I confused myself when I was doing some tests with changing the editor 
encoding on a source file with Japanese in Eclipse. My bad.

I understand your point that using UTF-8 as the default would be predictable. 
This is especially useful when a log file is read in an environment with a 
different platform encoding than where the log file was written.

It just does not seem right that if I log a Japanese string to the Console in 
my Japanese environment it comes out scrambled.
Let me check how log4j-1.2 and logback handle this. 


2. I was looking at 
http://docs.oracle.com/javase/6/docs/technotes/guides/intl/encoding.doc.html 
but I agree these are only for the Oracle JVM. Thanks for the pointer. I'll 
remove the Russian encoding from the JUnit test.
                
> 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-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-dev-h...@logging.apache.org

Reply via email to