Message9221
http://permalink.gmane.org/gmane.comp.lang.jython.user/10517
This user has wrapped the InteractiveConsole in a BeanShell widget that supplies console streams with java.io.Reader/Writer interfaces. He is able to type in Chinese on these streams. In Jython 2.2, the print command would echo a literal string containing Chinese characters as typed. Since 2.5 this has been possible and the work we did on the Jython console in 2.7 has not restored the expected behaviour.
Looking at the user's code and our source I estimate the problem is with the stream-handling in class PythonInterpreter, or perhaps withthe way PyFileReader supports it. 16 bit characters are being accepted here as the content of a PyString, then mishandled.
Part of the problem here is not using the unicode type. However, there is also a bug in Jython.
The fix for #2037 will help, in that the content check on PyString would raise an error in this case, but it doesn't fix the problem that character text in being treated as bytes.
There may be a work-around by avoiding the Reader/Writer interface to PythonInterpreter and working only with encoded text as bytes. |
|
Date |
User |
Action |
Args |
2014-11-27 21:18:47 | jeff.allen | set | recipients:
+ jeff.allen |
2014-11-27 21:18:47 | jeff.allen | set | messageid: <1417123127.21.0.831044900543.issue2234@psf.upfronthosting.co.za> |
2014-11-27 21:18:47 | jeff.allen | link | issue2234 messages |
2014-11-27 21:18:45 | jeff.allen | create | |
|