Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 1475 invoked from network); 22 Aug 2006 03:40:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Aug 2006 03:40:48 -0000 Received: (qmail 22070 invoked by uid 500); 22 Aug 2006 03:40:48 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 21346 invoked by uid 500); 22 Aug 2006 03:40:46 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 21315 invoked by uid 99); 22 Aug 2006 03:40:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Aug 2006 20:40:46 -0700 X-ASF-Spam-Status: No, hits=1.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 202.81.18.154 is neither permitted nor denied by domain of richard.liangyx@gmail.com) Received: from [202.81.18.154] (HELO ausmtp05.au.ibm.com) (202.81.18.154) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 21 Aug 2006 20:40:43 -0700 Received: from sd0208e0.au.ibm.com (d23rh904.au.ibm.com [202.81.18.202]) by ausmtp05.au.ibm.com (8.13.6/8.13.6) with ESMTP id k7M3grUv7938050 for ; Tue, 22 Aug 2006 13:42:53 +1000 Received: from d23av02.au.ibm.com (d23av02.au.ibm.com [9.190.250.243]) by sd0208e0.au.ibm.com (8.13.6/8.13.6/NCO v8.1.1) with ESMTP id k7M3hcQH011322 for ; Tue, 22 Aug 2006 13:43:39 +1000 Received: from d23av02.au.ibm.com (loopback [127.0.0.1]) by d23av02.au.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id k7M3bf0l010938 for ; Tue, 22 Aug 2006 13:37:41 +1000 Received: from d23m0011.cn.ibm.com (d23m0011.cn.ibm.com [9.181.32.74]) by d23av02.au.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k7M3bdho010820 for ; Tue, 22 Aug 2006 13:37:40 +1000 Received: from [127.0.0.1] ([9.181.106.172]) by d23m0011.cn.ibm.com (Lotus Domino Release 6.5.5HF262) with ESMTP id 2006082211400804-10189 ; Tue, 22 Aug 2006 11:40:08 +0800 Message-ID: <44EA7C98.4070402@gmail.com> Date: Tue, 22 Aug 2006 11:40:08 +0800 From: Richard Liang User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: harmony-dev@incubator.apache.org Subject: Re: [classlib][text] Bidi returns directional runs in visual order rather than in logical References: <8E389A5F2FEABA4CB1DEC35A25CB39CE2AB220@mssmsx411> In-Reply-To: <8E389A5F2FEABA4CB1DEC35A25CB39CE2AB220@mssmsx411> X-MIMETrack: Itemize by SMTP Server on D23M0011/23/M/IBM(Release 6.5.5HF262 | April 5, 2006) at 22/08/2006 11:40:08, Serialize by Router on D23M0011/23/M/IBM(Release 6.5.5HF262 | April 5, 2006) at 22/08/2006 11:40:11, Serialize complete at 22/08/2006 11:40:11 Content-Type: multipart/alternative; boundary="------------060500000705000709050206" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --------------060500000705000709050206 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=ISO-8859-1; format=flowed Sorry for my late reply, Alexey. I'm discussing this issue with ICU team, and have not drawn any conclusion till now. Richard. Ivanov, Alexey A wrote: > Hello Richard, > > Have you taken a look at this issue? > > Thanks, > -- > Alexey A. Ivanov > Intel Middleware Product Division > > >> -----Original Message----- >> From: Richard Liang [mailto:richard.liangyx@gmail.com] >> Sent: Tuesday, August 08, 2006 12:12 PM >> To: harmony-dev@incubator.apache.org >> Subject: Re: [classlib][text] Bidi returns directional runs in visual >> > order > >> rather than in logical >> >> Hello Ivanov, >> >> I will have a look at this issue, and will give my feedback later. >> Thanks a lot. >> >> Best regards, >> Richard. >> >> Ivanov, Alexey A wrote: >> >>> All, >>> >>> I'd like to attract more attention to this problem because this >>> incompatibility makes many tests in javax.swing.text package fail. >>> > The > >>> implementation of jx.s.t.AbstractDocument depends on j.t.Bidi. >>> >>> The root of the problem lies in ICU library. Here we have two >>> > options: > >>> 1. Fix the Bidi implementation, to be more precise its counterpart in >>> ICU; >>> 2. Fix AbstractDocument to handle such illogical run order. >>> >>> >>> Can text guys comment on this issue? >>> >>> >>> I decided to cite the test case from the JIRA: >>> public class Test { >>> public static final String LTR = "\u0061\u0062"; // these are >>> > "ab" > >>> public static final String RTL = "\u05DC\u05DD"; >>> public static final String newLine = "\n"; >>> >>> public static final String defText = LTR + newLine >>> + RTL + LTR + RTL; >>> public static void main(String[] args) { >>> Bidi bi = new Bidi(defText, >>> Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT); >>> >>> System.out.println("Runs: "); >>> final int count = bi.getRunCount(); >>> for (int i = 0; i < count; i++) { >>> System.out.println(i + ": " + bi.getRunLevel(i) >>> + " [" + bi.getRunStart(i) >>> + ", " + bi.getRunLimit(i) >>> + "]"); >>> } >>> } >>> } >>> >>> >>> Thank you in advance. >>> -- >>> Alexey A. Ivanov >>> Intel Middleware Product Division >>> >>> >>> P.S. Shall I add "compatibility" to the subject line? >>> >>> >>> >>> >>>> -----Original Message----- >>>> From: Ivanov, Alexey A [mailto:alexey.a.ivanov@intel.com] >>>> Sent: Tuesday, August 01, 2006 3:27 PM >>>> To: harmony-dev@incubator.apache.org >>>> Subject: [classlib][text] Bidi returns directional runs in visual >>>> > order > >>>> rather than in logical >>>> >>>> Hi all. >>>> >>>> Harmony implementation of java.text.Bidi returns directional runs >>>> (getRunStart(), getRunLimit(), getRunLevel()) in visual order if >>>> paragraph reading order is Right-to-Left. I mean the first run is at >>>> >>>> >>> the >>> >>> >>>> end of character buffer, and the last is at the beginning. I'd >>>> > expect > >>>> directional runs are enumerated in the order of the characters in >>>> > the > >>>> buffer, i.e. the logical order. >>>> >>>> I've created a JIRA issue for this: >>>> https://issues.apache.org/jira/browse/HARMONY-1028 >>>> >>>> Another difference from the RI is that in Harmony the text is >>>> > divided > >>>> into paragraphs before directional analysis, which is not done in >>>> > the > >>> RI >>> >>> >>>> despite the Unicode Bidirectional Algorithm [1] requires it. >>>> >>>> >>>> The output of the test case when run on Harmony: >>>> 0: 0 [0, 3] >>>> 1: 1 [7, 9] >>>> 2: 2 [5, 7] >>>> 3: 1 [3, 5] >>>> >>>> However, I'd expect the following output: >>>> 0: 0 [0, 3] >>>> 1: 1 [3, 5] >>>> 2: 2 [5, 7] >>>> 3: 1 [7, 9] >>>> >>>> The output of the test case when run on the RI: >>>> 0: 0 [0, 3] >>>> 1: 1 [3, 5] >>>> 2: 0 [5, 7] >>>> 3: 1 [7, 9] >>>> >>>> >>>> Any thoughts? >>>> >>>> [1] http://www.unicode.org/reports/tr9/ >>>> >>>> >>>> Regards, >>>> -- >>>> Alexey A. Ivanov >>>> Intel Middleware Product Division >>>> >>>> >>>> > --------------------------------------------------------------------- > >>>> Terms of use : http://incubator.apache.org/harmony/mailing.html >>>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org >>>> For additional commands, e-mail: >>>> > harmony-dev-help@incubator.apache.org > >>> --------------------------------------------------------------------- >>> Terms of use : http://incubator.apache.org/harmony/mailing.html >>> To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org >>> For additional commands, e-mail: >>> > harmony-dev-help@incubator.apache.org > >>> >>> >> -- >> Richard Liang >> China Software Development Lab, IBM >> > > --------------------------------------------------------------------- > Terms of use : http://incubator.apache.org/harmony/mailing.html > To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org > For additional commands, e-mail: harmony-dev-help@incubator.apache.org > > > -- Richard Liang China Software Development Lab, IBM --------------060500000705000709050206--