Curt, thanks for the quick response. Those are all good questions. Platform: Windows XP JDK: 1.4.2_04 I've opened the log file in a hex editor, and yes, every other character is 00 for English text.
We were using log4j version 1.2.8; I've downloaded 1.2.13 and am testing now. I'm not sure it will make a difference, though; I created my own FileAppender (not using our class that extends it), and I was able to successfully log Chinese characters. This implies that log4j is probably not the culprit. -----Original Message----- From: Curt Arnold [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 01, 2006 4:37 PM To: Log4J Users List Subject: Re: Logging unicode characters with log4j On Feb 1, 2006, at 3:05 PM, Crook, Laura wrote: > I am attempting to set our logs up so that they will save Chinese > characters properly, and I'm not having much luck. We have a class > which extends FileAppender, and in it I'm doing a brute-force > appender.setEncoding("UTF-16"), but unfortunately I'm still seeing > question marks in the log file. > > > > Can anyone tell me what I need to do to make this work? > Please confirm that the problem still occurs with the latest release of log4j. I recall some encoding related bugs that were fixed prior to 1.2.12, but can't locate the exact bug reports. Could you tell us the platform, JDK, and version of log4j you are using? Can you open the log file with a hex editor? Does it appear to be a double byte file, that is every other byte is 00 in stretches of English text. Does the problem occur when FileAppender is used or only when using your extension of FileAppender? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
