Issue1992
Created on 2012-11-26.04:03:17 by kga.official, last changed 2015-04-14.03:19:26 by zyasoft.
msg7533 (view) |
Author: kga.official (kga.official) |
Date: 2012-11-26.04:03:16 |
|
Jython 2.5.x breaks earlier behavior of printing UTF-8 characters from Java into Python using org.python.util.PythonInterpreter
2.2rc3 works fine. Sample Program attached. (Will attach sample outputs using 2.2 and 2.5.3 after submission).
This is a regression, seems important.
|
msg7534 (view) |
Author: kga.official (kga.official) |
Date: 2012-11-26.04:10:29 |
|
Output screenshot of not working Jython library 2.5.3
|
msg7535 (view) |
Author: kga.official (kga.official) |
Date: 2012-11-26.04:10:54 |
|
Output screenshot of _wroking_ 2.2rc3 library.
|
msg7536 (view) |
Author: kga.official (kga.official) |
Date: 2012-11-26.04:12:08 |
|
Screenshot of Java code opened in Eclipse as UTF-8 file. This is so that you can easily see the input and compare to output.
|
msg7986 (view) |
Author: Alex Grönholm (alex.gronholm) |
Date: 2013-04-05.21:36:40 |
|
Does the same happen if you use unicode sequences in place of UTF-8? Java's source encoding is not explicitly defined, so unicode sequences should be used if non-ASCII characters are needed in literals.
|
msg8337 (view) |
Author: kga.official (kga.official) |
Date: 2014-05-05.03:33:49 |
|
Sorry for the delayed reply, my project specifies UTF-8 encoding as the source code encoding. I haven't tried Unicode Sequences, will do when I get the opportunity.
Thanks for looking into this.
|
msg8695 (view) |
Author: Jim Baker (zyasoft) |
Date: 2014-06-19.01:10:44 |
|
I don't think executing this statement:
interp.exec("# coding=utf-8")
is going to do anything, certainly not for subsequent code. In general PythonInterpreter works with unicode; you can control the encoding of the underlying stdin/stdout/stderr by setting accordingly with setEncoding.
|
msg9825 (view) |
Author: Alex Grönholm (alex.gronholm) |
Date: 2015-04-14.02:19:34 |
|
The only reason this was working in 2.2 is because all strings were unicode strings back then. So, we should close this as invalid, yes?
|
msg9829 (view) |
Author: Jim Baker (zyasoft) |
Date: 2015-04-14.03:19:26 |
|
Makes sense to me. Let's close out.
|
|
Date |
User |
Action |
Args |
2015-04-14 03:19:26 | zyasoft | set | status: open -> closed resolution: remind -> invalid messages:
+ msg9829 |
2015-04-14 02:19:34 | alex.gronholm | set | messages:
+ msg9825 |
2014-06-19 01:10:44 | zyasoft | set | nosy:
+ zyasoft messages:
+ msg8695 |
2014-05-05 03:33:49 | kga.official | set | messages:
+ msg8337 |
2013-04-05 21:36:40 | alex.gronholm | set | nosy:
+ alex.gronholm messages:
+ msg7986 |
2013-02-19 19:12:06 | fwierzbicki | set | versions:
+ Jython 2.5, - 2.5.1, 2.5.0, 2.5.2, 2.5.3b1, 2.5.3b2 |
2013-02-19 19:11:46 | fwierzbicki | set | nosy:
+ fwierzbicki resolution: remind |
2012-11-26 04:12:08 | kga.official | set | files:
+ CodeInUTF8Editor.jpg messages:
+ msg7536 |
2012-11-26 04:10:54 | kga.official | set | files:
+ workingIn2.2rc3.jpg messages:
+ msg7535 |
2012-11-26 04:10:29 | kga.official | set | files:
+ notWorking2.5.jpg messages:
+ msg7534 |
2012-11-26 04:03:17 | kga.official | create | |
|