Return-Path: X-Original-To: apmail-logging-log4j-dev-archive@www.apache.org Delivered-To: apmail-logging-log4j-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id CA4B3109A0 for ; Tue, 28 Jan 2014 16:33:39 +0000 (UTC) Received: (qmail 46527 invoked by uid 500); 28 Jan 2014 16:33:38 -0000 Delivered-To: apmail-logging-log4j-dev-archive@logging.apache.org Received: (qmail 46429 invoked by uid 500); 28 Jan 2014 16:33:38 -0000 Mailing-List: contact log4j-dev-help@logging.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Log4J Developers List" Reply-To: "Log4J Developers List" Delivered-To: mailing list log4j-dev@logging.apache.org Received: (qmail 46415 invoked by uid 99); 28 Jan 2014 16:33:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 28 Jan 2014 16:33:38 +0000 Date: Tue, 28 Jan 2014 16:33:38 +0000 (UTC) From: "Brian (JIRA)" To: log4j-dev@logging.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LOG4J2-518) Logging of nested list uses incorrect charset MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LOG4J2-518?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1388= 4302#comment-13884302 ]=20 Brian commented on LOG4J2-518: ------------------------------ I am able to reproduce it with your code, after a slight modification. I f= ound the list has to be a certain length before this happens. I.e., just u= sing your code it does not happen, but once I make it 40 times longer with = the same strings, it does: {code} Logger log =3D LogManager.getLogger(PatternTestUTF8.class); List list =3D Arrays.asList("a", "hello \u65e5\u672c\u8a9e"= , "b", "\u30c6\u30b9\u30c8", "c", "\u6f22\u5b57"); =20 List longList =3D new ArrayList(); =20 for (int i =3D0; i < 40; i++){ longList.addAll(list); } =20 List> listOfList =3D Arrays.asList(longList, longList)= ; log.info(listOfList); log.info(longList); log.info(listOfList.get(0)); {code} I display the console output in Eclipse. When I switched to output to a fi= le instead, there was no issue. Maybe the problem is with the console (in = this case Eclipse console) itself as opposed to the logger or console loggi= ng in general? > 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 pa= ste 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) > =20 > But: > LOG.info("Phrases: "); > LOG.info(dataColumns.get(0)); > gives: > [phrase, phrase, phrase, phrase, phrase =E3=83=A2=E3=83=BC=E3=82=BF=E3= =83=BC=E5=88=B6=E5=BE=A1, phrase, =E3=83=9D=E3=83=83=E3=83=97=E3=82=A2=E3= =83=83=E3=83=97=E3=83=A1=E3=83=8B=E3=83=A5=E3=83=BC,=20 > (i.e., the correct Japanese). > Appender used: > {code:xml} > > > %p %C{1.} [%t] %m%n > UTF-8 > > > {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