From 97d15b8cd77998f37c279a023aa9f07def956e60 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Tue, 21 May 2024 15:45:29 +0200 Subject: vmime: avoid changing SEVEN_BIT when encoding::decideImpl sees U+007F (#303) * vmime: avoid changing SEVEN_BIT when encoding::decideImpl sees U+007F Do not switch to QP/B64 when encountering U+007F. U+007F is part of ASCII just as much as U+0001 is. --------- Co-authored-by: Vincent Richard --- src/vmime/encoding.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/vmime/encoding.cpp b/src/vmime/encoding.cpp index e66e268a..bca31573 100644 --- a/src/vmime/encoding.cpp +++ b/src/vmime/encoding.cpp @@ -157,7 +157,7 @@ const encoding encoding::decideImpl( const string::difference_type length = end - begin; const string::difference_type count = std::count_if( - begin, end, [](unsigned char x) { return x < 127; }); + begin, end, [](unsigned char x) { return x <= 127; }); // All is in 7-bit US-ASCII --> 7-bit (or Quoted-Printable...) if (length == count) { -- cgit v1.2.3