Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix conversion a surrogate pair #4095

Merged
merged 1 commit into from
Jul 30, 2024
Merged

Fix conversion a surrogate pair #4095

merged 1 commit into from
Jul 30, 2024

Conversation

phprus
Copy link
Contributor

@phprus phprus commented Jul 30, 2024

Fix for issue: #4094

Errors without fix:
https://github.com/phprus/fmt/actions/runs/10160437906/job/28096817999

14/19 Test #14: std-test .........................***Failed    0.02 sec
[==========] Running 18 tests from 2 test suites.
[----------] Global test environment set-up.
[----------] 16 tests from std_test
[ RUN      ] std_test.path
D:\a\fmt\fmt\test\std-test.cc(39): error: Expected equality of these values:
  fmt::format("{}", path(L"HEAD \xD83D\xDE00 TAIL"))
    Which is: "HEAD  TAIL"
  "HEAD \xF0\x9F\x98\x80 TAIL"
    Which is: "HEAD \xF0\x9F\x98\x80 TAIL"
    As Text: "HEAD 😀 TAIL"
D:\a\fmt\fmt\test\std-test.cc(40): error: Expected equality of these values:
  fmt::format("{}", path(L"HEAD \xD83D\xD83D\xDE00 TAIL"))
    Which is: "HEAD \xEF\xBF\xBD TAIL"
    As Text: "HEAD � TAIL"
  "HEAD �\xF0\x9F\x98\x80 TAIL"
    Which is: "HEAD \xEF\xBF\xBD\xF0\x9F\x98\x80 TAIL"
    As Text: "HEAD �😀 TAIL"
[  FAILED  ] std_test.path (1 ms)

Signed-off-by: Vladislav Shchapov <vladislav@shchapov.ru>
@phprus
Copy link
Contributor Author

phprus commented Jul 30, 2024

This bug was added on commit:
3dec65b

@vitaut vitaut merged commit d326c72 into fmtlib:master Jul 30, 2024
43 checks passed
@vitaut
Copy link
Contributor

vitaut commented Jul 30, 2024

Thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants