You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mark Hindess (JIRA)" <ji...@apache.org> on 2006/08/29 10:26:23 UTC
[jira] Resolved: (HARMONY-1028) [classlib][text] Bidi returns
directional runs in visual order as opposed to logical.
[ http://issues.apache.org/jira/browse/HARMONY-1028?page=all ]
Mark Hindess resolved HARMONY-1028.
-----------------------------------
Resolution: Fixed
Applied in r438006. Alexey, please verify that this resolves the issue.
> [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