Re: Case Conversion Fix for MB Chars

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Volkan YAZICI <volkan(dot)yazici(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Case Conversion Fix for MB Chars
Date: 2005-12-01 21:21:23
Message-ID: 200512012121.jB1LLNT28983@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches pgsql-tr-genel


Where are we on this patch? Is it to be applied?

---------------------------------------------------------------------------

Volkan YAZICI wrote:
> On 11/27/05, Volkan YAZICI <volkan(dot)yazici(at)gmail(dot)com> wrote:
> > Tests made on an i686 with a
> > 2.6.12.5 kernel. Here's a short list of cases I tried with both latin5
> > and unicode charsets:
> > - lower/upper functions with Turkish characters.
> > - ILIKE matches with both lower and upper case Turkish characters.
> > (Above testes succeeded for non-Turkish characters too.)
>
> I read the above paragraph again and realized the out of usability of
> it. Here's a modified one:
>
> Test's made on a Debian GNU/Linux (stable) 3.1 by patching
> src/backend/utils/adt/like.c (r1.62) and
> src/backend/utils/adt/oracle_compat.c (r1.64) files. Related software
> versions:
> - gcc-3.3 [3.3.5-13]
> - libc6-dev [2.3.2.ds1-22]
> - locales [2.3.2.ds1-22]
>
> Tried test cases using patched CVS HEAD:
>
> [For Latin5]
> $ usr/bin/initdb -D var/data
> $ LANG="tr_TR.ISO-8859-9" usr/bin/postmaster -D var/data
> $ usr/bin/createdb -E latin5 test_latin5
> $ usr/bin/psql test_latin5
> Welcome to psql 8.2devel, the PostgreSQL interactive terminal.
>
> Type: \copyright for distribution terms
> \h for help with SQL commands
> \? for help with psql commands
> \g or terminate with semicolon to execute query
> \q to quit
>
> test_latin5=# SHOW client_encoding;
> client_encoding
> -----------------
> LATIN5
> (1 row)
>
> test_latin5=# SELECT upper('abcdefg?h?ijklmno?prs?tu?vyz qwx 0123456789');
> upper
> -------------------------------------------
> ABCDEFG?HI?JKLMNO?PRS?TU?VYZ QWX 0123456789
> (1 row)
>
> test_latin5=# SELECT
> test_latin5-# lower('ABCDEFG?HI?JKLMNO?PRS?TU?VYZ QWX 0123456789');
> lower
> ---------------------------------------------
> abcdefg?h?ijklmno?prs?tu?vyz qwx 0123456789
> (1 row)
>
> test_latin5=# BEGIN;
> BEGIN
> test_latin5=# CREATE TEMP TABLE t (v varchar);
> CREATE TABLE
> test_latin5=# COPY t FROM stdin;
> Enter data to be copied followed by a newline.
> End with a backslash and a period on a line by itself.
> >> ?123
> >> I123
> >> i123
> >> ?123
> >> \.
> test_latin5=# SELECT v FROM t;
> v
> ------
> ?123
> I123
> i123
> ?123
> (4 rows)
>
> test_latin5=# SELECT v FROM t WHERE v ILIKE '?%';
> v
> ------
> ?123
> I123
> (2 rows)
>
> test_latin5=# SELECT v FROM t WHERE v ILIKE 'I%';
> v
> ------
> ?123
> I123
> (2 rows)
>
> test_latin5=# SELECT v FROM t WHERE v ILIKE 'i%';
> v
> ------
> i123
> ?123
> (2 rows)
>
> test_latin5=# SELECT v FROM t WHERE v ILIKE '?%';
> v
> ------
> i123
> ?123
> (2 rows)
>
> test_latin5=# ROLLBACK;
> ROLLBACK
>
> [For UNICODE]
> Same steps as above with LANG="tr_TR.UTF-8" and database/client
> encoding as UNICODE.
>
> Hope this tests help.
>
>
> Regards.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Devrim GUNDUZ 2005-12-01 21:30:55 Re: Case Conversion Fix for MB Chars
Previous Message Bruce Momjian 2005-12-01 20:50:06 Re: [HACKERS] Strange interval arithmetic

Browse pgsql-tr-genel by date

  From Date Subject
Next Message Devrim GUNDUZ 2005-12-01 21:30:55 Re: Case Conversion Fix for MB Chars
Previous Message Devrim GUNDUZ 2005-12-01 13:54:02 [pgadmin-hackers] SVN Commit by dpage: r4777 - in branches/REL-1_4_0_PATCHES/pgadmin3: i18n pkg/win32/src (fwd)