logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Curt Arnold <carn...@apache.org>
Subject Re: Issues with Korean/Chinese locales in XmlLayout...
Date Fri, 23 Jan 2009 19:03:05 GMT
There were several issues with the log4j XMLLayout that have been  
addressed in the last few years.  It is very likely that these same  
issues were inherited by log4net.

See the following bugs:


Trying to pre-escape the message to work around the issue with  
XMLLayout is an undesirable kludge.

Part of the issue is that the architecture tries to split XML  
serialization half way with a XML document to character string  
conversion (XMLLayout) and a character string to byte stream  
(character set encoding) when the right way would be to have a XML  
document to byte stream converter.  Since the XMLLayout may need to  
escape characters that can not be represented in the current code  
page.  The only consistent way of making sure that the output of  
XMLLayout is properly rendered is to escape character entities (for  
example: &#x6FE;) but US-ASCII characters.

These changes might be helpful:

svn diff -r311427:HEAD http://svn.apache.org/repos/asf/logging/log4j/trunk/src/main/java/org/apache/log4j/xml/XMLLayout.java
svn diff -r311427:HEAD http://svn.apache.org/repos/asf/logging/log4j/trunk/src/main/java/org/apache/log4j/helpers/Transform.java

View raw message