Content-type: multipart/alternative; Boundary="1__=C7BBF305DFA897218f9e8a93df938690918cC7BBF305DFA89721" --1__=C7BBF305DFA897218f9e8a93df938690918cC7BBF305DFA89721 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: quoted-printable Philip, Thanks for your reply. I tried to force the encoding, but not work yet. Here is what I tried. My OS Locale is Chinese. Before I forced the enco= ding value, it is already utf-8. Best Regards -------------------- Sean = Philip Jenvey = = To Sheng Qiang Xu/China/IBM@IBMCN = 2012-01-31 11:47 = cc jython-users users = = Subj= ect Re: [Jython-users] I can only in= put a character with = java.lang.System.console().readl= ine () in Chinese or Japanese langua= ge = = = = = = On Jan 17, 2012, at 7:17 PM, Sheng Qiang Xu wrote: > I'm using jython 2.5.1 and my OS is windows XP and language is Chines= e. > > When using java.lang.System.console().readline() to input text, I can= only input a character (the behavior seems like pressing enter) and the= console jumps to next line. > > Could somebody pls help to take a look at this? > Thanks. You probably have an incorrect input encoding value set on your platfor= m. You can see what Jython uses for its input encoding by looking at the v= alue of sys.stdin.encoding. You can try forcing it to say UTF-8 by passing "-Dpython.console.encoding=3DUTF-8" to Jython -- Philip Jenvey = --1__=C7BBF305DFA897218f9e8a93df938690918cC7BBF305DFA89721 Content-type: text/html; charset=US-ASCII Content-Disposition: inline Content-transfer-encoding: quoted-printable

Philip,

Thanks for your reply.
I tried to force the encoding, but not work yet.
Here is what I tried. My OS Locale is Chinese. Before I forced the enco= ding value, it is already utf-8.


Best Regards
--------------------
Sean

3D"InactivePhilip Jenvey ---2012-01-31 11:4= 7:30---On Jan 17, 2012, at 7:17 PM, Sheng Qiang Xu wrote:

=
          Philip Jenvey <pjenvey@underboss.org>

          2012-01-31 11:47

=
3D=
To
3D""
Sheng Qiang Xu/China/IBM@IBMCN
3D=
cc
3D""
jython-users users <jython-users@lists.sourceforge.= net>
3D=
Subject
3D""
Re: [Jython-users] I can only input a character with j= ava.lang.System.console().readline() in Chinese or Japanese language
3D=3D""


On Jan 17, 2012, at 7:17 PM, Sheng Qiang Xu wrote:

> I'm using jython 2.5.1 and my OS is windows XP and language is Chi= nese.
>
> When using java.lang.System.console().readline() to input text, I = can only input a character (the behavior seems like pressing enter) and= the console jumps to next line.
>
> Could somebody pls help to take a look at this?
> Thanks.

You probably have an incorrect input encoding value set on your platfor= m.

You can see what Jython uses for its input encoding by looking at the v= alue of sys.stdin.encoding. You can try forcing it to say UTF-8 by pass= ing "-Dpython.console.encoding=3DUTF-8" to Jython

--
Philip Jenvey


= --1__=C7BBF305DFA897218f9e8a93df938690918cC7BBF305DFA89721--