Skip to content

Commit ce405e0

Browse files
committed
EBCDIC character encoding is not trivially copyable
1 parent b8c7307 commit ce405e0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main/cpp/charsetencoder.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -649,12 +649,14 @@ void CharsetEncoder::encode(CharsetEncoderPtr& enc,
649649
bool CharsetEncoder::isTriviallyCopyable(const LogString& src, const CharsetEncoderPtr& enc)
650650
{
651651
bool result;
652+
#if !LOG4CXX_CHARSET_EBCDIC
652653
if (dynamic_cast<LocaleCharsetEncoder*>(enc.get()))
653654
{
654655
result = src.end() == std::find_if(src.begin(), src.end()
655656
, [](const logchar& ch) -> bool { return 0x80 <= (unsigned int)ch; });
656657
}
657658
else
659+
#endif
658660
result = !!dynamic_cast<TrivialCharsetEncoder*>(enc.get());
659661
return result;
660662
}

0 commit comments

Comments
 (0)