-
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
3 - chrono-test (Failed) #2337
Comments
Branch with the installed of the locales package for CI: https://github.com/phprus/fmt/tree/locale-1 Test errors:
|
CentOS 7 + clang-9 + libc++:
|
Check locale:
Test code: #include <locale>
#include <ctime>
#include <sstream>
#include <iostream>
void print(const std::locale &loc)
{
auto time = std::tm();
time.tm_wday = 1;
auto&& os = std::ostringstream();
using iterator = std::ostreambuf_iterator<char>;
const auto& facet = std::use_facet<std::time_put<char, iterator>>( loc );
facet.put(os, os, ' ', &time, 'a', 0);
std::cerr << "locale " << loc.name() <<": " << os.str() << std::endl;
}
int main()
{
auto loc_c = std::locale::classic();
auto loc = std::locale("ru_RU.UTF-8");
print(loc_c);
auto old = std::locale::global(loc);
print(loc);
print(loc_c);
print(old);
return 0;
} Unexpected output:
After replace main function to: int main()
{
auto loc = std::locale("ru_RU.UTF-8");
print(loc);
return 0;
} Output is:
System: openSUSE Leap 15.2 I don't understand why it works this way... |
Is it fixed by #2349? |
Yes |
Commit: 760ca5c
OS: openSUSE Leap 15.2
Console locale:
Locale ru_RU.UTF-8 is present:
Test error:
The text was updated successfully, but these errors were encountered: