Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 45067 invoked from network); 23 Aug 2006 11:45:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Aug 2006 11:45:22 -0000 Received: (qmail 47304 invoked by uid 500); 23 Aug 2006 11:45:22 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 47232 invoked by uid 500); 23 Aug 2006 11:45:22 -0000 Mailing-List: contact harmony-commits-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-commits@incubator.apache.org Received: (qmail 47221 invoked by uid 99); 23 Aug 2006 11:45:22 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Aug 2006 04:45:22 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Aug 2006 04:45:21 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0190C7142FA for ; Wed, 23 Aug 2006 11:42:15 +0000 (GMT) Message-ID: <25996385.1156333335003.JavaMail.jira@brutus> Date: Wed, 23 Aug 2006 04:42:15 -0700 (PDT) From: "Alexey A. Ivanov (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Commented: (HARMONY-1028) [classlib][text] Bidi returns directional runs in visual order as opposed to logical. In-Reply-To: <32718000.1154430198397.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-1028?page=comments#action_12429974 ] Alexey A. Ivanov commented on HARMONY-1028: ------------------------------------------- It works fine. This test case works as I expect, and AbstractDocument tests which depend on Bidi stopped failing. Thank you very much. > [classlib][text] Bidi returns directional runs in visual order as opposed to logical. > ------------------------------------------------------------------------------------- > > Key: HARMONY-1028 > URL: http://issues.apache.org/jira/browse/HARMONY-1028 > Project: Harmony > Issue Type: Bug > Components: Classlib > Reporter: Alexey A. Ivanov > Attachments: Harmony-1028.diff > > > 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). > Consider the following test case: > import java.text.Bidi; > public class Test { > public static final String LTR = "\u0061\u0062"; > 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) > + "]"); > } > } > } > The output on Harmony: > Runs: > 0: 0 [0, 3] > 1: 1 [7, 9] > 2: 2 [5, 7] > 3: 1 [3, 5] > The output on the RI: > 0: 0 [0, 3] > 1: 1 [3, 5] > 2: 0 [5, 7] > 3: 1 [7, 9] -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira