logging-log4cxx-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: PropertyConfigurator::configure file encoding
Date Thu, 03 Feb 2011 05:32:59 GMT
Property files in Java are by definition in ISO-8859-1 which cannot support Chinese characters
without using escape characters (see http://download.oracle.com/javase/6/docs/api/java/util/Properties.html).
 log4cxx follows this convention so that it is compatible with log4j configuration files.

However, the issue is the substitution of the contents of the APPDATA environment variable
into the evaluation of the configuration which should occur after the properties file in parsed
and should happen in LogString (aka Unicode) space.

I'm guessing things are failing since the evaluation of APPDATA does not match an existing
directory and therefore the appender fails.  It would be interesting to experiment with an
environment variable for the file name (not the path) to see how the name is mangled.

There are a couple of things that would be very useful to know:

What operating system and version is being used?
What is the default character encoding (control panel or $ locale charmap)?
What settings are used to build log4cxx?
What is the observed behavior when using environment variables for the filename (not the path)?
 What were the expected behavior?

I'm pretty confident that the property files are correctly always interpreted as ISO-8859-1
regardless of the default encoding.

log4cxx depends on APR to get the environment variables and for file IO, so something unexpected
could be happening there or log4cxx could be mangling the substitution.


Mime
View raw message