swebb2066 commented on issue #494: URL: https://github.com/apache/logging-log4cxx/issues/494#issuecomment-2814724266
> but Unicode-specific characters cannot be logged @WorldRobertProject please provide a code snippet that shows how you would like to log Unicode-specific characters. Are you using Qt? Can you to advise if I should apply this patch to Log4cxx: ``` diff --git a/src/main/include/log4cxx-qt/transcoder.h b/src/main/include/log4cxx-qt/transcoder.h index 0b1aaab4..43ad6447 100644 --- a/src/main/include/log4cxx-qt/transcoder.h +++ b/src/main/include/log4cxx-qt/transcoder.h @@ -31,7 +31,7 @@ @param src The QString variable. */ #define LOG4CXX_DECODE_QSTRING(var, src) \ - LOG4CXX_NS::LogString var = (src).toStdString() + LOG4CXX_NS::LogString var = (src).toUtf8().constData() /** Create a QString equivalent of \c src. @@ -43,7 +43,7 @@ @param src The log4cxx::LogString variable. */ #define LOG4CXX_ENCODE_QSTRING(var, src) \ - QString var = QString::fromStdString(src) + QString var = QString::fromUtf8(src.c_str()) #endif // LOG4CXX_LOGCHAR_IS_UTF8 #if LOG4CXX_LOGCHAR_IS_WCHAR ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org