logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: Special characters in log4j? German umlaut?
Date Sun, 21 Oct 2007 12:21:44 GMT

On Oct 19, 2007, at 3:40 AM, BruceSpring wrote:

>
> Can log4j log special characters?  For instance the German umlaut  
> characters?
> Umlaut characters are vowels with the two dots above them.
>

Yes.  FileAppender's and the like will by default use the system  
default encoding which may or may not support a particular  
character.  If you are having problems with getting the expected  
characters into the output, then explicitly specify an encoding.  For  
example, "UTF-16" and "UTF-8" can represent all unicode characters  
while "ISO-8859-1" can only represent the first 256 unicode  
characters (which includes all needed for the Western European  
languages).  If you see mangled characters when you view one of 8-bit  
files ("UTF-8" or "ISO-8859-1"), it is likely due a mismatch between  
the files encoding and the encoding assumed by your editor).  You  
could avoid that problem by specifying the "UTF-16" encoding which  
would not be ambiguous, but would double the file size.



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message