4

I use std::local() to MBS to WCS in Android NDK.

But...

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"))

All lead to crashes.

and... std::locale::global(std::locale("en_US.UTF-8")) also crashes.

Is std::locale() not supported in Android NDK?

My STL library is

krsteeve
  • 1,794
  • 4
  • 19
  • 29

1 Answers1

2

According to this the answer is No.

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.

david.pfx
  • 10,520
  • 3
  • 30
  • 63