Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-518

Logging of nested list uses incorrect charset

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Not A Problem
    • 2.0-beta9
    • None
    • Appenders, Layouts
    • Windows 7

    Description

      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:

         <Console name="Console" target="SYSTEM_OUT">
            <PatternLayout>
               <pattern>%p %C{1.} [%t] %m%n</pattern>
               <charset>UTF-8</charset>
            </PatternLayout>
         </Console>
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            brian44 Brian
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: