std::locale("") throws exception

22 views
Skip to first unread message

Dan C

unread,
Dec 4, 2019, 3:30:44 PM12/4/19
to emscripten-discuss
I'm trying to use Emscripten 1.39.3, and hit an exception caused by std::locale("") . The following is the error message.
"collate_byname<char>::collate_byname failed to construct for "

According to http://www.cplusplus.com/reference/locale/locale/locale/, empty string is the environment's default locale. I found that if I create the std::locale with its default constructor, I won't get any exception. I also tried to create locale with empty string natively with MinGW g++, and I also got an exception "locale::facet::_S_create_c_locale name not valid".

Not sure if this is an Emscripten issue or something else.
Reply all
Reply to author
Forward
0 new messages