Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 56657 invoked from network); 12 Dec 2008 06:05:15 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Dec 2008 06:05:15 -0000 Received: (qmail 23444 invoked by uid 500); 12 Dec 2008 06:05:22 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 23386 invoked by uid 500); 12 Dec 2008 06:05:22 -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 23377 invoked by uid 99); 12 Dec 2008 06:05:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Dec 2008 22:05:21 -0800 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED 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; Fri, 12 Dec 2008 06:05:07 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 66CB5234C39E for ; Thu, 11 Dec 2008 22:04:46 -0800 (PST) Message-ID: <800899949.1229061886406.JavaMail.jira@brutus> Date: Thu, 11 Dec 2008 22:04:46 -0800 (PST) From: "Daniel Cheng (JIRA)" To: java-dev@lucene.apache.org Subject: [jira] Created: (LUCENE-1490) CJKTokenizer convert HALFWIDTH_AND_FULLWIDTH_FORMS wrong MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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 Fix For: 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