Update jnius_conversion.pxi

change chr(<char>j_chars[i]) to unichr(j_chars[i]), now it can deal with Chinese
This commit is contained in:
retsyo 2015-01-29 19:47:26 +08:00
parent 627bdc6d61
commit 15664625ac
1 changed files with 1 additions and 1 deletions

View File

@ -224,7 +224,7 @@ cdef convert_jarray_to_python(JNIEnv *j_env, definition, jobject j_object):
elif r == 'C': elif r == 'C':
j_chars = j_env[0].GetCharArrayElements( j_chars = j_env[0].GetCharArrayElements(
j_env, j_object, &iscopy) j_env, j_object, &iscopy)
ret = [chr(<char>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[0].ReleaseCharArrayElements(
j_env, j_object, j_chars, 0) j_env, j_object, j_chars, 0)