You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by BruceSpring <in...@gmail.com> on 2007/10/19 10:40:41 UTC

Special characters in log4j? German umlaut?

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


-- 
View this message in context: http://www.nabble.com/Special-characters-in-log4j--German-umlaut--tf4651798.html#a13290478
Sent from the Log4j - Users mailing list archive at Nabble.com.


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


Re: Special characters in log4j? German umlaut?

Posted by Curt Arnold <ca...@apache.org>.
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