Return-Path: Delivered-To: apmail-logging-log4net-user-archive@www.apache.org Received: (qmail 51533 invoked from network); 16 Apr 2008 14:59:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Apr 2008 14:59:48 -0000 Received: (qmail 59119 invoked by uid 500); 16 Apr 2008 14:59:48 -0000 Delivered-To: apmail-logging-log4net-user-archive@logging.apache.org Received: (qmail 59095 invoked by uid 500); 16 Apr 2008 14:59:47 -0000 Mailing-List: contact log4net-user-help@logging.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Log4NET User" List-Id: Delivered-To: mailing list log4net-user@logging.apache.org Received: (qmail 59084 invoked by uid 99); 16 Apr 2008 14:59:47 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Apr 2008 07:59:47 -0700 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [68.142.200.237] (HELO smtp102.biz.mail.mud.yahoo.com) (68.142.200.237) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 16 Apr 2008 14:58:53 +0000 Received: (qmail 89026 invoked from network); 16 Apr 2008 14:59:11 -0000 Received: from unknown (HELO echamberlain) (echamberlain@ventripoint.com@63.226.207.211 with login) by smtp102.biz.mail.mud.yahoo.com with SMTP; 16 Apr 2008 14:59:10 -0000 X-YMail-OSG: n9aa_WcVM1k0H1Rzu3UwHAjP7v1cClJhXT9WEzNVCtn6ifEdFp5RntJIemJOxThNYQh5tQ-- X-Yahoo-Newman-Property: ymail-3 From: "Eric Chamberlain" To: "'Log4NET User'" References: <01ae01c89b1c$1a581970$6c00a8c0@ventripoint.com> Subject: RE: Problems with log4net Rolling File Appender Date: Wed, 16 Apr 2008 07:59:13 -0700 Keywords: disclaimer Message-ID: <010201c89fd2$702b65e0$6c00a8c0@ventripoint.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 11 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Thread-index: AcifAwzT3y/HxmurQ52LFox5mhWymQAibUFQABE52fA= X-Virus-Checked: Checked by ClamAV on apache.org One clarification here would seem to be in order. UTF-8 is a variable-length encoding. The length of any given code point will be between 1 and 4 bytes long. UTF-8 is a byte stream and so there really = is no byte ordering (unlike UTF-16). Hence, the BOM is pretty useless for UTF-8. For grubby details, see http://en.wikipedia.org/wiki/UTF-8. Eric Chamberlain Software Engineer =20 -----Original Message----- From: Dag Christensen [mailto:Dag.Christensen@vismaretail.no]=20 Sent: Wednesday, April 16, 2008 12:25 AM To: Log4NET User Subject: RE: Problems with log4net Rolling File Appender >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=FC=DFen / 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/