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

Robert Middleton edited comment on LOGCXX-483 at 6/10/17 2:57 AM:
------------------------------------------------------------------

I just looked at this a little more just now, and I've discovered something 
rather odd with it.  It seems that if you log the same string in a Qt-based 
program, it will output the proper characters, however this is only the case if 
a QApplication has been initialized.  If the QApplication hasn't been 
initialized, it seems that the string will get printed out as all question 
marks.

This makes me think that there is something that should be initialized in 
log4cxx that Qt is initializing.

Stepping through the Qt sources, I found the following line:
{{setlocale(LC_ALL, "");}}

Adding this to the code fixes the text so that it is not all question marks.  
Should log4cxx set this by default?


was (Author: rm5248):
I just looked at this a little more just now, and I've discovered something 
rather odd with it.  It seems that if you log the same string in a Qt-based 
program, it will output the proper characters, however this is only the case if 
a QApplication has been initialized.  If the QApplication hasn't been 
initialized, it seems that the string will get printed out as all question 
marks.

This makes me think that there is something that should be initialized in 
log4cxx that Qt is initializing.

> Not able to see hebrew values when logging in log4cxx
> -----------------------------------------------------
>
>                 Key: LOGCXX-483
>                 URL: https://issues.apache.org/jira/browse/LOGCXX-483
>             Project: Log4cxx
>          Issue Type: Bug
>         Environment: Linux Debian 8 32bit
>            Reporter: Giora Guttsait
>
> When logging messages with a console appender (whose output is directed to a 
> file), hebrew text is shown as weird symbols.
> It really affects out ability to debug and analyze the program output at 
> specific points, so a quick fix(if possible) would be great



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to