Skip to content

UTF-8 truncation #1389

Closed
Closed
@tajtiattila

Description

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 "é".

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions