From bd868f3a5161d75ce411d2211b249da8781c7416 Mon Sep 17 00:00:00 2001 From: YuHuanTin <51024916+YuHuanTin@users.noreply.github.com> Date: Sat, 19 Aug 2023 23:13:20 +0800 Subject: [PATCH] Improve compatibility with GBK #3598 (#3599) --- include/fmt/format.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/fmt/format.h b/include/fmt/format.h index f5247586..1a05db31 100644 --- a/include/fmt/format.h +++ b/include/fmt/format.h @@ -1453,7 +1453,7 @@ template class to_utf8 { ++p; if (p == s.end() || (c & 0xfc00) != 0xd800 || (*p & 0xfc00) != 0xdc00) { if (policy == to_utf8_error_policy::abort) return false; - buf.append(string_view("�")); + buf.append(string_view("\xEF\xBF\xBD")); --p; } else { c = (c << 10) + static_cast(*p) - 0x35fdc00;