utf8.patch 597 B

12345678910111213
  1. diff --git a/include/fmt/format.h b/include/fmt/format.h
  2. index e5bd8b1..1a05db3 100644
  3. --- a/include/fmt/format.h
  4. +++ b/include/fmt/format.h
  5. @@ -1453,7 +1453,7 @@ template <typename WChar, typename Buffer = memory_buffer> class to_utf8 {
  6. ++p;
  7. if (p == s.end() || (c & 0xfc00) != 0xd800 || (*p & 0xfc00) != 0xdc00) {
  8. if (policy == to_utf8_error_policy::abort) return false;
  9. - buf.append(string_view("�"));
  10. + buf.append(string_view("\xEF\xBF\xBD"));
  11. --p;
  12. } else {
  13. c = (c << 10) + static_cast<uint32_t>(*p) - 0x35fdc00;