Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not support unicode_literals ? #311

Closed
zhouyang209117 opened this issue Nov 27, 2017 · 4 comments
Closed

Not support unicode_literals ? #311

zhouyang209117 opened this issue Nov 27, 2017 · 4 comments

Comments

@zhouyang209117
Copy link

os version: win7 64bit
python version: 2.7.13
pyjnius version: 1.1.1
jdk version: 1.8.0_111
source code

# coding:utf-8
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from jnius import autoclass

Stack = autoclass('java.util.Stack')
stack = Stack()
stack.push('hello')
stack.push('world')

print(stack.pop())
print(stack.pop())

The output is sth like this:

Y�
ý�

If delete this line,from future import unicode_literals, the output is right, that is

world
hello
@oddjobz
Copy link

oddjobz commented Nov 29, 2017

Mm, your example works fine for me as-is .. (?)

@g-bon
Copy link

g-bon commented Dec 11, 2017

Happening to me as well both with python3.6 or 2.7 if importing unicode literals.

Seems to replicate this? knappador/kivy-toaster#1

@Arnie97
Copy link

Arnie97 commented Apr 30, 2018

Confirmed this bug with Python 3.6.

Should this be a duplicate of #300?

@KeyWeeUsr
Copy link
Contributor

Yup, duplicate.

@KeyWeeUsr KeyWeeUsr added this to the 1.1.4 milestone Nov 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants