You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Brian (JIRA)" <ji...@apache.org> on 2014/01/28 17:39:38 UTC

[jira] [Closed] (LOG4J2-518) Logging of nested list uses incorrect charset

     [ https://issues.apache.org/jira/browse/LOG4J2-518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian closed LOG4J2-518.
------------------------

    Resolution: Not A Problem

Problem appears to be not with the logger but with the console it logs to.

> Logging of nested list uses incorrect charset
> ---------------------------------------------
>
>                 Key: LOG4J2-518
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-518
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: Appenders, Layouts
>    Affects Versions: 2.0-beta9
>         Environment: Windows 7
>            Reporter: Brian
>            Priority: Minor
>              Labels: list, utf-8
>
> When I log a list that contains UTF-8 (japanese characters) it works fine and displays correctly in the console.  However, when this list is nested in another list, it displays boxes with question marks.  When I copy and paste these characters elsewhere they display correctly.
> E.g.:
>    LOG.info("Data columns: ");
>    LOG.info(dataColumns);
> gives:
>    INFO c.m.s.r.t.f.d.ListDataLoaderTest [main] [[phrase, phrase, phrase, phrase, phrase ??????, phrase, ??????????, ...
> (where "?" are surrounded by boxes in my actual console output)
>         
> But:
>    LOG.info("Phrases: ");
>    LOG.info(dataColumns.get(0));
> gives:
>    [phrase, phrase, phrase, phrase, phrase モーター制御, phrase, ポップアップメニュー, 
> (i.e., the correct Japanese).
> Appender used:
> {code:xml}
>    <Console name="Console" target="SYSTEM_OUT">
>       <PatternLayout>
>          <pattern>%p %C{1.} [%t] %m%n</pattern>
>          <charset>UTF-8</charset>
>       </PatternLayout>
>    </Console>
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

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