On 2017/11/4 13:47, Frédéric wrote:
Hi,
I saw that std::locale(local_name) does not work with mingw (throws an
exception). Even std::locale("") does not work.
What is the reason for that?
Any chance that it works some day?
Maybe it's a problem with the C++ standard library, not mingw w64?
See libstdc++ source: gcc/libstdc++-v3/src/c++98/localename.cc #47
If you pass "" to the ctor of `std::locale` then either the environment
variables `LC_ALL` or `LANG` is favored (in that order).
Note that the C locale work (std::setlocale(locale_name) works.
Kind regards,
F
See: gcc/libstdc++-v3/config/locale/generic/c_locale.cc #227
The "C" locale is the only supported one at the moment - even the
"POSIX" one will not be supported. If the string passed to
`locale::facet::_S_create_c_locale()` is anything other than "C" you get
an exception "locale::facet::_S_create_c_locale name not valid".
--
Best regards,
LH_Mouse
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public