mirror of https://github.com/kivy/pyjnius.git
fix encoding issues in test_implementation.py
This commit is contained in:
parent
68165ed04b
commit
2c5a14dae2
|
@ -46,7 +46,7 @@ cdef void populate_args(JNIEnv *j_env, tuple definition_args, jvalue *j_args, ar
|
|||
elif isinstance(py_arg, basestring) and \
|
||||
argtype in ('Ljava/lang/String;', 'Ljava/lang/Object;'):
|
||||
j_args[index].l = j_env[0].NewStringUTF(
|
||||
j_env, <char *><bytes>py_arg)
|
||||
j_env, <char *><bytes>py_arg.encode('utf-8'))
|
||||
elif isinstance(py_arg, JavaClass):
|
||||
jc = py_arg
|
||||
check_assignable_from(j_env, jc, argtype[1:-1])
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# coding: utf-8
|
||||
# -*- coding: utf-8 -*-
|
||||
import unittest
|
||||
from jnius.reflect import autoclass
|
||||
|
||||
|
@ -18,4 +18,4 @@ class ImplementationTest(unittest.TestCase):
|
|||
|
||||
def test_unicode(self):
|
||||
System = autoclass('java.lang.System')
|
||||
System.out.printf('é'.encode('utf-8'))
|
||||
System.out.printf(u'é')
|
||||
|
|
Loading…
Reference in New Issue