Formatting using string precision fails when there are non-ascii characters.
Here is a code to reproduce (first line works as expected, second doesn't as there is an extra "diamond-shaped" character printed):
#include <fmt/format.h>
int main()
{
fmt::print(">>{:.6}<<\n", "1234567");
fmt::print(">>{:.6}<<\n", "123456\xad");
return 0;
}
https://godbolt.org/z/zzY4Y4Pec
Formatting using string precision fails when there are non-ascii characters.
Here is a code to reproduce (first line works as expected, second doesn't as there is an extra "diamond-shaped" character printed):
https://godbolt.org/z/zzY4Y4Pec