-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Question: locale treated differently by fmt and std::cout #3460
Comments
Currently Line 95 in abdb7fd
It will be more consistent with other defaults which are locale-independent. A PR is welcome! |
Thanks, Victor! |
vitaut
changed the title
Question: locale treated differently by fmt and std::out
Question: locale treated differently by fmt and std::cout
Sep 18, 2023
Fixed in 8a39388. |
Thanks, Victor! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pretty sure this is me being stupid; not a bug. Please see example here:
https://godbolt.org/z/rasnKzfae
When I uncomment line 22, I get what I want: no commas in hex number.
When I comment out line 22, I get commas in my hex numbers which is not what anyone would want.
What's the right way to do not get commas in hex numbers when using fmt and overloaded ostream operators?
Seems like std::out does not "see" the locale in the way fmt does. Is this because std::cout is constructed before main() sets
std::locale::global(std::locale("en_US.UTF-8"));
?Thank you for your help. Apologies if this is a stupid question.
The text was updated successfully, but these errors were encountered: