Message8278

Author rpan
Recipients rpan
Date 2014-04-08.17:07:50
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1396976870.8.0.275426059372.issue2123@psf.upfronthosting.co.za>
In-reply-to
Content
More test to the issue of "aa='aa'". The machine I am using is:

Microsoft Windows 8 Enterprise Chinese (Simplified) (Intel 64-bit, Bare OS)


>java -jar jython-standalone-2.7-b1.jar
Jython 2.7b1 (default:ac42d59644e9, Feb 9 2013, 15:24:52)
[Java HotSpot(TM) Client VM (Oracle Corporation)] on java1.7.0_51
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.stdin.encoding
'ms936'
>>> aa="aa"
...                    <-- Hangs

If changing the code page to 1252: "chcp 1252" before running Jython, the aa="aa" works fine without hanging, but it will miss the multi-byte characters support.

>java -jar jython-standalone-2.7-b1.jar
Jython 2.7b1 (default:ac42d59644e9, Feb 9 2013, 15:24:52)
[Java HotSpot(TM) Client VM (Oracle Corporation)] on java1.7.0_51
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.stdin.encoding
'cp1252'
>>> aa="??"        <-- Multi-byte characters are not display correctly
>>> print aa
??
>>>

In jython 2.2.1, aa="aa" works fine with the code page ms936.

c:\jython2.2.1>chcp
活动代码页: 936

c:\jython2.2.1>jython.bat
Jython 2.2.1 on java1.7.0_51
Type "copyright", "credits" or "license" for more information.
>>> aa="aa"
>>>                 <-- No hang
>>> aa="操作"  <-- Multi-byte characters are displayed correctly
>>> print aa
操作
>>>

So it looks like a regression on Jython 2.7-b1. If beta 2 could cover this issue, that would be very helpful on running Jython on multi-bytes character machine (while other issues mentioned previously can be workarounded by -Dpython.console= property).
History
Date User Action Args
2014-04-08 17:07:50rpansetmessageid: <1396976870.8.0.275426059372.issue2123@psf.upfronthosting.co.za>
2014-04-08 17:07:50rpansetrecipients: + rpan
2014-04-08 17:07:50rpanlinkissue2123 messages
2014-04-08 17:07:50rpancreate