We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
L specifier with en_US locale gives wrong output in some cases:
#include <fmt/format.h> #include <locale> int main() { std::locale::global(std::locale("en_US.UTF-8")); fmt::print(" 256 => {:>10L}\n", 256); fmt::print(" 1000 => {:>10L}\n", 1000); fmt::print(" 34000 => {:>10L}\n", 34000); // => 134,000 fmt::print(" 123456 => {:>10L}\n", 123456); // => ,123,456 fmt::print(" -256 => {:>10L}\n", -256); // => ,256 fmt::print(" -1000 => {:>10L}\n", -1000); fmt::print(" -34000 => {:>10L}\n", -34000); // => --34,000 fmt::print("-123456 => {:>10L}\n", -123456); // => -,123,456 }
https://godbolt.org/z/4ax5Tr
Minimal reproducer (the width and alignment doesn't matter):
fmt::format(std::locale("en_US.UTF-8"), "{:L}", -256);
The text was updated successfully, but these errors were encountered:
Fix handling of thousand separator (#1927)
a5e7e7d
Good catch, thanks. Some of these are already fixed in 7.0.3 and the issue with a sign is fixed in a5e7e7d.
Sorry, something went wrong.
No branches or pull requests
L specifier with en_US locale gives wrong output in some cases:
https://godbolt.org/z/4ax5Tr
Minimal reproducer (the width and alignment doesn't matter):
The text was updated successfully, but these errors were encountered: