From 15664625acd4e984a613b3c26276fe646e5224a9 Mon Sep 17 00:00:00 2001 From: retsyo Date: Thu, 29 Jan 2015 19:47:26 +0800 Subject: [PATCH] Update jnius_conversion.pxi change chr(j_chars[i]) to unichr(j_chars[i]), now it can deal with Chinese --- jnius/jnius_conversion.pxi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jnius/jnius_conversion.pxi b/jnius/jnius_conversion.pxi index 00daf96..39d603a 100644 --- a/jnius/jnius_conversion.pxi +++ b/jnius/jnius_conversion.pxi @@ -224,7 +224,7 @@ cdef convert_jarray_to_python(JNIEnv *j_env, definition, jobject j_object): elif r == 'C': j_chars = j_env[0].GetCharArrayElements( j_env, j_object, &iscopy) - ret = [chr(j_chars[i]) for i in range(array_size)] + ret = [unichr(j_chars[i]) for i in range(array_size)] j_env[0].ReleaseCharArrayElements( j_env, j_object, j_chars, 0)