This is an automated email from the ASF dual-hosted git repository.
swebb2066 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/logging-log4cxx.git
The following commit(s) were added to refs/heads/master by this push:
new b6676077 Prevent a deadlock when LOG4CXX_CHAR=utf-8 and
LOG4CXX_CHARSET=EBCDIC (#250)
b6676077 is described below
commit b6676077752b073b1a3224917a8a3bdde26c58a5
Author: Stephen Webb <[email protected]>
AuthorDate: Fri Aug 11 13:52:30 2023 +1000
Prevent a deadlock when LOG4CXX_CHAR=utf-8 and LOG4CXX_CHARSET=EBCDIC (#250)
---
src/main/cpp/charsetdecoder.cpp | 3 +--
src/main/cpp/charsetencoder.cpp | 3 +--
src/main/cpp/exception.cpp | 3 +--
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/src/main/cpp/charsetdecoder.cpp b/src/main/cpp/charsetdecoder.cpp
index b400e41a..26a099df 100644
--- a/src/main/cpp/charsetdecoder.cpp
+++ b/src/main/cpp/charsetdecoder.cpp
@@ -466,8 +466,7 @@ class LocaleCharsetDecoder : public CharsetDecoder
try
{
- LogString e;
-
Transcoder::decode(encoding, e);
+ LOG4CXX_DECODE_CHAR(e,
encoding);
decoder = getDecoder(e);
}
catch
(IllegalArgumentException&)
diff --git a/src/main/cpp/charsetencoder.cpp b/src/main/cpp/charsetencoder.cpp
index ee5f5ff7..010a6ec1 100644
--- a/src/main/cpp/charsetencoder.cpp
+++ b/src/main/cpp/charsetencoder.cpp
@@ -494,8 +494,7 @@ class LocaleCharsetEncoder : public CharsetEncoder
else if (encoding != enc)
{
encoding = enc;
- LogString ename;
- Transcoder::decode(encoding,
ename);
+ LOG4CXX_DECODE_CHAR(ename,
encoding);
try
{
diff --git a/src/main/cpp/exception.cpp b/src/main/cpp/exception.cpp
index 2adf3708..5daed641 100644
--- a/src/main/cpp/exception.cpp
+++ b/src/main/cpp/exception.cpp
@@ -29,8 +29,7 @@ using namespace log4cxx::helpers;
Exception::Exception(const LogString& msg1)
{
- std::string m;
- Transcoder::encode(msg1, m);
+ LOG4CXX_ENCODE_CHAR(m, msg1);
size_t len = m.size();
if (len > MSG_SIZE)