harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Hindess (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (HARMONY-1028) [classlib][text] Bidi returns directional runs in visual order as opposed to logical.
Date Fri, 25 Aug 2006 20:19:24 GMT
     [ http://issues.apache.org/jira/browse/HARMONY-1028?page=all ]

Mark Hindess reassigned HARMONY-1028:
-------------------------------------

    Assignee: Mark Hindess

> [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
>         Assigned To: Mark Hindess
>         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

        

Mime
View raw message