调用C ++ JNI NewStringUTF崩溃android应用程序时,使用许多不同种类的表情符号和语言(超越ascii,但仍然有效修改utf-8) [英] Call to C++ JNI NewStringUTF crashes android app when using many different kinds of emoji and languages (beyond ascii, but still valid modified utf-8)
问题描述
这种崩溃发生在cocos2d-x v2.2.6并确认在3.x)使用NDK 10e与工具链4.8(不知道如果任何一个,这是太大的区别,我们使用9d之前移动到Android Studio,我确定我们有这个问题,但有很多
如果你从未推送任何未修改的utf-8符号(即坚持ascii),你可能永远不会看到这个问题。 / p>
日志猫:
12-11 01:02:17.460 10451-10959 / com.appsomniacs.da2.debug A / art:sart / runtime / check_jni.cc:65] string:'I am trying to solve a Cocos2d-x Keyboard input crash on Android 5.x when I create CCImage from the text with many emoji found on the keyboard (some work though, but most don't.) On Android 4.x several of the devices just display mangled text/extra characters. The source of the crash is the JNI's NewStringUTF() call. It simply does not support all of the 2, 3 and 4 byte utf-8 characters in Android 5/Lollipop.
This crash happens on cocos2d-x v2.2.6 (and confirmed on 3.x) using NDK 10e with Toolchain 4.8 (not sure if any of that makes too much of a difference, we were using 9d prior to moving to Android Studio and I am certain we had this issue, but there was much less usage to lollipop.)
If you never push any of non-modified utf-8 symbols (i.e. stick to ascii) you'll probably never see the issue.
Log Cat:
12-11 01:02:17.460 10451-10959/com.appsomniacs.da2.debug A/art: sart/runtime/check_jni.cc:65] string: '
这篇关于调用C ++ JNI NewStringUTF崩溃android应用程序时,使用许多不同种类的表情符号和语言(超越ascii,但仍然有效修改utf-8)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!