>Is there a workaround for that? I mean this can't be intended behaviour >:) But as I interpret your answer, this has most likely something to do with >the Mono Framework, not with log4net, right? > >Mit freundlichen Grüßen / Regards >Johannes Frank
Not sure if this behavior is intended or not, but there's an Encoding attribute on the (Rolling)FileAppenders which is set to Encoding.Default unless you override it. Perhaps your Mono build gave an early warning for a bug you'll encounter later on other systems? Below the hood, RollingFileAppender uses StreamWriter(stream, encoding) where stream is a FileStream so you might want to experiment with this class a bit. With UTF-8, non-ASCII/international characters are encoded with two bytes. IMHO you should be prepared to handle BOM/byte order mark if you intend to work with this encoding because of its 8/16 bit duality. If your parser believes your UTF-8 encoded file contains only ASCII these international characters won't be preserved. When I have problems with UTF-8, I usually turn to ISO 8859 instead. In this encoding, ASCII is preserved for the low 7 bits while regional characters are mapped to the remaining bytes. For example, here in Norway we use ISO 8859-1 (Latin 1 - Western Europe). See http://en.wikipedia.org/wiki/ISO_8859 for more information. Best wishes, Dag ########################################### This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange. For more information, connect to http://www.f-secure.com/
