I did this with ICU 4.0
com.ibm.icu.text.Bidi b = new
com.ibm.icu.text.Bidi("\u05DC\u05DD",
com.ibm.icu.text.Bidi.DIRECTION_DEFAULT_RIGHT_TO_LEFT);
System.err.println("Text - " + b.getTextAsString());
System.err.println("RTL - " + b.isRightToLeft());
System.err.println("LTF - " + b.isLeftToRight());
System.err.println("Mixed - " + b.isMixed());
It printed -
RTL - true
LTF - false
Mixed - false
What flag values are being passed? I know these are RTL code points,
but I think the algorithm needs to be told what the assumed direction
is. If you use either the '_DEFAULT_' values you should get the
correct thing because these are strong characters. If you set to RTL
you're saying it's RTL. If you set to LTR (the value 0), the it's
assumed to be LTR with some RTL characters, thus the mixed.
I don't have a lot of experience with BIDI, so bear with me on this.
-Nathan
On Wed, Aug 13, 2008 at 5:46 AM, Tharindu Mathew <[EMAIL PROTECTED]> wrote:
> is RighttoLeft returns true, isLefttoRight return false.
>
> The text used was - public static final String RTL = "\u05DC\u05DD";
>
>
> Regards,
>
> Tharindu
>
>
> On Wed, Aug 13, 2008 at 6:00 AM, Nathan Beyer <[EMAIL PROTECTED]> wrote:
>
>> Can you post the example in the post?
>>
>> What about the 'isLeftToRight' and 'isRightToLeft' methods? What are they
>> returning?
>>
>> On Tue, Aug 12, 2008 at 8:46 AM, Tharindu Mathew <[EMAIL PROTECTED]
>> >wrote:
>>
>> > I was testing the the failure in Right to Left text updates in
>> > PlainViewI18N_LineView_UpdateTest.
>> >
>> > I used both Hebrew and Arabic as the right to left text and I have
>> > discovered that bidi.isMixed[1] returns true. This should return false
>> for
>> > this.
>> >
>> > Can this be verified and reported to them?
>> >
>> > [1]
>> >
>> > public boolean isMixed() {
>> > return icuBidi.isMixed();
>> > }
>> >
>> > Regards,
>> >
>> > Tharindu
>> >
>>
>