Thanks for the follow up. I did some more testing and using the property ' log4j.appender.ErrorMonitor.Encoding=UTF-8' did work correctly. I was able to see UTF-8 chars in my logs. The confusing bit is that the rolling file appender is outputting a file that does not have any bits specifying the character set. So for example, when I open the file in BBEdit, it believes the file format and character encoding is DOS Mac OS Roman.
To answer your other questions.
- Does specifying the encoding work correctly for plain FileAppender and is broken for RollingFileAppender?
I have not tried.
What version of log4j are you using?
log4j 1.2.8
Does the behavior change when using the SVN trunk?
I'll have to try. Thanks for the tip. Sam. Sam. On 4/30/06, Curt Arnold <[EMAIL PROTECTED]> wrote:
On Apr 30, 2006, at 10:23 AM, [EMAIL PROTECTED] wrote: > The expected typography of UTF-8 might be "UTF8" instead... > At least, this is the expected value with some jasper report and > for the -Dfile.encoding JVM switch > If I recall correctly :) > > \T, > According to http://java.sun.com/j2se/1.5.0/docs/api/java/nio/charset/ Charset.html, "UTF-8" a standard charset identifier. There is no guarantee that "UTF8" will be available. On Apr 26, 2006, at 5:33 PM, Sam wrote: > I should mention I am trying to set the encoding with this > property. Having > this property set does not seem to do anything. > log4j.appender.ErrorMonitor.Encoding=UTF-8 > Couple of questions: Does specifying the encoding work correctly for plain FileAppender and is broken for RollingFileAppender? What version of log4j are you using? Does the behavior change when using the SVN trunk? The SVN trunk contains a unit test (http://svn.apache.org/repos/asf/ logging/log4j/trunk/tests/src/java/org/apache/log4j/ EncodingTest.java) to check that the encoding specification is correctly handled for some common states, so it shouldn't be totally broken. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
