Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 94256 invoked from network); 9 Oct 2007 09:13:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Oct 2007 09:13:52 -0000 Received: (qmail 43912 invoked by uid 500); 9 Oct 2007 09:13:40 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 43693 invoked by uid 500); 9 Oct 2007 09:13:39 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 43684 invoked by uid 99); 9 Oct 2007 09:13:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2007 02:13:39 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2007 09:13:40 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id CDEC1714238 for ; Tue, 9 Oct 2007 02:12:50 -0700 (PDT) Message-ID: <13851060.1191921170840.JavaMail.jira@brutus> Date: Tue, 9 Oct 2007 02:12:50 -0700 (PDT) From: "Bernt M. Johnsen (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (DERBY-2967) Single character does not match high value unicode character with collation TERRITORY_BASED In-Reply-To: <24303214.1185209731243.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-2967?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel#action_12533310 ]=20 Bernt M. Johnsen commented on DERBY-2967: ----------------------------------------- I also agree that even if 'aa'=3D'=C3=A5' should be true with Norwegian col= lation, 'aa' LIKE '=C3=A5' should give false according to secion 8.5 which = says that LIKE is done on a character by character comparision. 'aa' is two= characters while '=C3=A5' is one. > Single character does not match high value unicode character with collati= on TERRITORY_BASED > -------------------------------------------------------------------------= ------------------ > > Key: DERBY-2967 > URL: https://issues.apache.org/jira/browse/DERBY-2967 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.4.0.0 > Reporter: Kathey Marsden > Assignee: Mamta A. Satoor > Attachments: DERBY2967_offset_based_diff_Oct02_07.txt, DERBY2967_= offset_based_stat_Oct02_07.txt, fullcoll.out, patch2_setOffset_fullcoll.out= , patch2_with_setOffset_diff_Sep2007.txt, patch2_with_setOffset_stat_Sep200= 7.txt, step1_iteratorbased_Sep1507_diff.txt, step1_iteratorbased_Sep1507_st= at.txt, temp_diff.txt, temp_stat.txt, TestFrench.java, TestNorway.java > > > With TERRITORY_BASED collation '_' does not match the character \uFA2D. = It is the same for english or norwegian. FOR collation UCS_BASIC it matche= s fine. Could you tell me if this is a bug? > Here is a program to reproduce. > import java.sql.*; > public class HighCharacter { > public static void main(String args[]) throws Exception > { > System.out.println("\n Territory no_NO"); > Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); > Connection conn =3D DriverManager.getConnection("jdbc:derby:nordb;crea= te=3Dtrue;territory=3Dno_NO;collation=3DTERRITORY_BASED"); > testLikeWithHighestValidCharacter(conn); > conn.close(); > System.out.println("\n Territory en_US"); > conn =3D DriverManager.getConnection("jdbc:derby:endb;create=3Dtrue;te= rritory=3Den_US;collation=3DTERRITORY_BASED"); > testLikeWithHighestValidCharacter(conn); > conn.close(); > System.out.println("\n Collation USC_BASIC"); > conn =3D DriverManager.getConnection("jdbc:derby:basicdb;create=3Dtrue= "); > testLikeWithHighestValidCharacter(conn); > } > public static void testLikeWithHighestValidCharacter(Connection conn) th= rows SQLException { > Statement stmt =3D conn.createStatement(); > try { > stmt.executeUpdate("drop table t1"); > }catch (SQLException se) > {// drop failure ok. > } > stmt.executeUpdate("create table t1(c11 int)"); > stmt.executeUpdate("insert into t1 values 1"); > =20 > // \uFA2D - the highest valid character according to > // Character.isDefined() of JDK 1.4; > PreparedStatement ps =3D > conn.prepareStatement("select 1 from t1 where '\uFA2D' like ?"); > String[] match =3D { "%", "_", "\uFA2D" }; > for (int i =3D 0; i < match.length; i++) { > System.out.println("select 1 from t1 where '\\uFA2D' like " + match[i]= ); > ps.setString(1, match[i]); > ResultSet rs =3D ps.executeQuery(); > if( rs.next() && rs.getString(1).equals("1")) > System.out.println("PASS"); > else System.out.println("FAIL: no match"); > rs.close(); > } > } > } > Mamta made some comments on this issue in the following thread: > http://www.nabble.com/Single-character-does-not-match-high-value-unicode-= character-with-collation-TERRITORY_BASED.-Is-this-a-bug-tf4118767.html --=20 This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.