Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 76796 invoked from network); 14 Aug 2008 13:13:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Aug 2008 13:13:18 -0000 Received: (qmail 64038 invoked by uid 500); 14 Aug 2008 13:13:16 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 64007 invoked by uid 500); 14 Aug 2008 13:13:16 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 63996 invoked by uid 99); 14 Aug 2008 13:13:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Aug 2008 06:13:16 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mccloud35@gmail.com designates 209.85.200.173 as permitted sender) Received: from [209.85.200.173] (HELO wf-out-1314.google.com) (209.85.200.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Aug 2008 13:12:20 +0000 Received: by wf-out-1314.google.com with SMTP id 28so453700wfc.24 for ; Thu, 14 Aug 2008 06:12:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type:references; bh=yq9Wg7Ae4gM2UsvZyS3dRyrf+ePu8VSm/SCfCeyNlj4=; b=r3tO9lJidZjjIXIdPNOnPz0hRq4gmWF9xI8LW7SgDZUO2XpTsmUdnYxAgYOwEqd/cZ HmI8bQKFG0tJ4ceb89zstlOSI8WVywZCNEnLa/JzKxhgpNjcwF+v+I9MVtICRYrr3UAg NoYFAqiDJJcS/62c6uwZxjniu4ZNcYK5nfOsM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:references; b=MtkAUNcoIrI3lcNFJR7nOG59kUnb/GZ9D2Te6klDdOmnUpb17YMvQAyMMLXMMbzLTM sAwofIR8B75FDVTRyD7YDMBPixtjtkbjwdLO0rMXhTRWkqwTI3LIQdFuWCqMEqMrUaGH AjI+yVZAerjcBXG5HrY3y+dAWqdY+UpuX0x3g= Received: by 10.142.143.7 with SMTP id q7mr484040wfd.3.1218719568455; Thu, 14 Aug 2008 06:12:48 -0700 (PDT) Received: by 10.142.211.2 with HTTP; Thu, 14 Aug 2008 06:12:48 -0700 (PDT) Message-ID: <61d2e9b20808140612p6c017172s60fa47f902e33b9d@mail.gmail.com> Date: Thu, 14 Aug 2008 18:42:48 +0530 From: "Tharindu Mathew" To: dev@harmony.apache.org Subject: Re: possible bug in com.ibm.icu.text.Bidi In-Reply-To: <3b3f27c60808131935ob250dc7oa736010a84a6173@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_58436_12606793.1218719568462" References: <61d2e9b20808120646v5b2688d6tda4b23f481990365@mail.gmail.com> <3b3f27c60808121730t30e11fa3x4a8cad9dc9c55ca6@mail.gmail.com> <61d2e9b20808130346h6d63583asea68f895d6a56de2@mail.gmail.com> <3b3f27c60808131935ob250dc7oa736010a84a6173@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_58436_12606793.1218719568462 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks Nathan. I think the default value not being set is the issue. The test doesn't set any default direction so this should be the problem. Anyway I put in a work around to solve this problem for now. This checks for mixed and RighttoLeft for RighttoLeft languages. This thread will be helpful if anyone else sees this same problem. Regards, Tharindu On Thu, Aug 14, 2008 at 8:05 AM, Nathan Beyer wrote: > 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 > 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 > 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 >> >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 > >> > > >> > > > ------=_Part_58436_12606793.1218719568462--