[ 
https://issues.apache.org/jira/browse/LOGCXX-453?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14335521#comment-14335521
 ] 

Thorsten Schöning commented on LOGCXX-453:
------------------------------------------

You should have better asked that question first on the users mailing list, so 
that we can rule out things like a wrong built lib and such, because in general 
Log4cxx is capable of handling Unicode characters, but need to be build 
properly. So first of all, you need to provide more information about your 
build options, especially about the macors in logstring.h, which you need to 
define according to the strings you user internally. Additionally you should 
try to use the trunk version of the lib as it contains a lot of bug fixes form 
the past years.

> Cannot output unicode text to log file using LOG4CXX_INFO/DEBUG/WARN/ERROR
> --------------------------------------------------------------------------
>
>                 Key: LOGCXX-453
>                 URL: https://issues.apache.org/jira/browse/LOGCXX-453
>             Project: Log4cxx
>          Issue Type: Bug
>          Components: Appender, Documentation
>    Affects Versions: 0.10.0
>         Environment: Linux, Ubuntu, Trusty, Ubuntu 14.04
>            Reporter: Stephane Tremblay
>   Original Estimate: 8h
>  Remaining Estimate: 8h
>
> I've got a program in C++ that uses a FileAppender to output log messages 
> using the macros LOG4CXX_DEBUG LOG4CXX_INFO LOG4CXX_WARN and LOG4CXX_ERROR.
> We use unicode text strings in our project because our software will be used 
> around the world in different languages and locales. Every time we try to log 
> a message using one of the aforementioned macros and that message contains 
> accented characters such as é è ç, etc. the characters get replaces with 
> question marks.
> For example, if I were to use LOG4CXX_INFO(logger, "François") the output in 
> the log file would be as follows:
> Fran??ois
> I've tried setting my LC_ALL locale in my environment variables, setting in 
> in the application with setlocale, I've tried calling the FileAppender's 
> setEncoding method, calling FileAppender's setOption method as well but to no 
> avail.
> Also, setEncoding and getEncding are not documented. I assumed the proper 
> string to pass was "UTF-8", I also tried "en-US.UTF-8" and others, but that 
> didn't work either.
> I might be mistaken, but I believe outputting unicode text to a log does not 
> work.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to