【问题标题】:Android NDK doesn't support std::locale()?Android NDK 不支持 std::locale()?
【发布时间】:2013-10-19 10:08:54
【问题描述】:

我在 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 库是

【问题讨论】:

    标签: android android-ndk locale stlport


    【解决方案1】:

    根据this,答案是否定的。

    C 库/本地代码不支持语言环境,这是故意的。 正如 Elliot 所指出的,您唯一的希望是使用 JNI 来获取相关值。

    【讨论】:

      猜你喜欢
      • 2014-05-11
      • 1970-01-01
      • 1970-01-01
      • 2019-02-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-26
      相关资源
      最近更新 更多