You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by Alex Hui <AH...@shoretel.com> on 2011/02/01 22:28:32 UTC
Question about unicode
To whom it may concern,
What do I need to do to get log4net to write Unicode characters to a file?
Rigtht now all the Unicode characters show up as "????"
Thanks,
Alex
________________________________
This e-mail and any files transmitted with it are ShoreTel property, are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not one of the named recipient(s) or otherwise have reason to believe that you have received this message in error, please notify the sender and delete this message immediately from your computer. Any other use, retention, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited
RE: Question about unicode
Posted by Rob Prouse <Ro...@Ivara.com>.
Set the encoding for the FileAppender like this,
<encoding value="unicodeFFFE" /> or <encoding value="utf-8" />
Valid values for the Encoding property are any values that can be passed to the System.Text.Encoding.GetEncoding(string) method.
The valid values are platform dependant. More information is available here:
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemtextencodingclassgetencodingtopic2.asp
Also, make sure that the text editor you are using to view the logs supports Unicode. http://notepad-plus-plus.org/
Rob Prouse
From: Alex Hui [mailto:AHui@shoretel.com]
Sent: Tuesday, February 01, 2011 4:29 PM
To: log4net-user@logging.apache.org
Subject: Question about unicode
To whom it may concern,
What do I need to do to get log4net to write Unicode characters to a file?
Rigtht now all the Unicode characters show up as "????"
Thanks,
Alex
________________________________
This e-mail and any files transmitted with it are ShoreTel property, are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not one of the named recipient(s) or otherwise have reason to believe that you have received this message in error, please notify the sender and delete this message immediately from your computer. Any other use, retention, dissemination, forwarding, printing, or copying of this e-mail is strictly prohibited