我在
Android NDK中使用std :: local()到MBS到WCS.
但…
std::locale::global(std::locale("kor"))
std::locale::global(std::locale("ko"))
std::locale::global(std::locale("ko_KR"))
std::locale::global(std::locale("ko_KR.eucKr"))
std::locale::global(std::locale("ko_KR.euckr"))
std::locale::global(std::locale("ko_KR.EUCKR"))
一切都导致崩溃.
和…
std :: locale :: global(std :: locale(“en_US.UTF-8”))也崩溃了.
Android NDK中不支持std :: locale()吗?
我的STL库是
最佳答案 根据
this,答案是否定的.
There is no support for locales in the C library / from native code, and this is intentional.
As Elliot pointed out, your only hope is to use JNI to get relevant values.