Message8062

Author jeff.allen
Recipients beachmachine, fwierzbicki, jeff.allen
Date 2013-07-12.20:45:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1373661948.78.0.535139458493.issue2036@psf.upfronthosting.co.za>
In-reply-to
Content
Hi Andreas:

There are shortcomings in the default JLine library which I've been working to understand. An alternative Java Readline console is available. One may also use a plain console and do without any line-editing.

I have worked through a number of console encoding and library combinations in order to catalogue their behaviour. The only one I find to work on (my) Linux system with unicode is the Readline console with GNU readline as the supporting library. I had to get and install the package libreadline-java for this alternative to work.

You could select the Readline console at run time with:
jython -Dpython.console=org.python.util.ReadlineConsole -Dpython.console.readlinelib=GnuReadline

Please let us know if this works for you. If it gives you what you want, you can set these values as default in the Jython registry.

I tested this on Linux Mint 14, OpenJDK 1.7.0_21, in a Gnome Terminal window set to UTF-8 encoding, and running bash with LC_ALL=en_GB.UTF-8. raw_input() and sys.stdin.readline() both returned correctly encoded accented characters typed using the Extended Winkeys keyboard, but I would expect a genuine German keyboard to work too. (Setting a Greek keyboard certainly works.)

I'm working on console integration at the moment, so this advice may change, but it is my aim at present to keep both JLine and Readline useable, and selected the same way, since neither seems adequate in all circumstances. (Also, Java Readline seems not to be actively maintained.)

Jeff
History
Date User Action Args
2013-07-12 20:45:48jeff.allensetmessageid: <1373661948.78.0.535139458493.issue2036@psf.upfronthosting.co.za>
2013-07-12 20:45:48jeff.allensetrecipients: + jeff.allen, fwierzbicki, beachmachine
2013-07-12 20:45:48jeff.allenlinkissue2036 messages
2013-07-12 20:45:48jeff.allencreate