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

UTF-8 truncation #1389

Closed
tajtiattila opened this issue Nov 2, 2019 · 0 comments · Fixed by #1390
Closed

UTF-8 truncation #1389

tajtiattila opened this issue Nov 2, 2019 · 0 comments · Fixed by #1390

Comments

@tajtiattila
Copy link
Contributor

I've done some tests with UTF-8 strings, and think string formatting with precision doesn't work as expected.

fmt::format(u8"{:.4}", u8"cafés");

The format call above, even if done properly with char8_t based strings returns "caf\xc3" instead of "café", where "\xc3" is the first byte of the UTF-8 sequence "\xc3\xa9" for "é".

tajtiattila added a commit to tajtiattila/fmt that referenced this issue Nov 2, 2019
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 a pull request may close this issue.

1 participant