Skip to content

Commit

Permalink
Improve compatibility with GBK #3598 (#3599)
Browse files Browse the repository at this point in the history
  • Loading branch information
YuHuanTin authored Aug 19, 2023
1 parent bbb784f commit bd868f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -1453,7 +1453,7 @@ template <typename WChar, typename Buffer = memory_buffer> 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<uint32_t>(*p) - 0x35fdc00;
Expand Down

0 comments on commit bd868f3

Please sign in to comment.