-
-
Notifications
You must be signed in to change notification settings - Fork 425
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix fmt parsing error on windows (#2481)
* fix fmt parsing error on windows * introduce changes as patch * Update xmake.lua --------- Co-authored-by: ruki <[email protected]>
- Loading branch information
1 parent
e7e2419
commit f3eeaa6
Showing
2 changed files
with
17 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git a/include/fmt/format.h b/include/fmt/format.h | ||
index e5bd8b1..1a05db3 100644 | ||
--- a/include/fmt/format.h | ||
+++ b/include/fmt/format.h | ||
@@ -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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters