Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 49392 invoked from network); 18 Mar 2009 17:30:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Mar 2009 17:30:18 -0000 Received: (qmail 51167 invoked by uid 500); 18 Mar 2009 17:30:12 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 51125 invoked by uid 500); 18 Mar 2009 17:30:12 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 50796 invoked by uid 99); 18 Mar 2009 17:30:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Mar 2009 10:30:11 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Mar 2009 17:30:10 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id C24A4234C498 for ; Wed, 18 Mar 2009 10:29:50 -0700 (PDT) Message-ID: <1442055645.1237397390794.JavaMail.jira@brutus> Date: Wed, 18 Mar 2009 10:29:50 -0700 (PDT) From: "Michael McCandless (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Resolved: (LUCENE-1490) CJKTokenizer convert HALFWIDTH_AND_FULLWIDTH_FORMS wrong In-Reply-To: <800899949.1229061886406.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENE-1490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Michael McCandless resolved LUCENE-1490. ---------------------------------------- Resolution: Fixed Thanks Daniel! > CJKTokenizer convert HALFWIDTH_AND_FULLWIDTH_FORMS wrong > ---------------------------------------------------------- > > Key: LUCENE-1490 > URL: https://issues.apache.org/jira/browse/LUCENE-1490 > Project: Lucene - Java > Issue Type: Bug > Reporter: Daniel Cheng > Assignee: Michael McCandless > Fix For: 2.9, 2.4 > > > CJKTokenizer have these lines.. > if (ub == Character.UnicodeBlock.HALFWIDTH_AND_FULLWIDTH_FORMS) { > /** convert HALFWIDTH_AND_FULLWIDTH_FORMS to BASIC_LATIN */ > int i = (int) c; > i = i - 65248; > c = (char) i; > } > This is wrong. Some character in the block (e.g. U+ff68) have no BASIC_LATIN counterparts. > Only 65281-65374 can be converted this way. > The fix is > if (ub == Character.UnicodeBlock.HALFWIDTH_AND_FULLWIDTH_FORMS && i <= 65474 && i> 65281) { > /** convert HALFWIDTH_AND_FULLWIDTH_FORMS to BASIC_LATIN */ > int i = (int) c; > i = i - 65248; > c = (char) i; > } -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org For additional commands, e-mail: java-dev-help@lucene.apache.org