From: | Volkan YAZICI <volkan(dot)yazici(at)gmail(dot)com> |
---|---|
To: | marcelo Cortez <jmdc_marcelo(at)yahoo(dot)com(dot)ar> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: encoding problem |
Date: | 2005-12-02 11:55:41 |
Message-ID: | 7104a7370512020355j29be1e99nc06968864aa878de@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On 12/1/05, marcelo Cortez <jmdc_marcelo(at)yahoo(dot)com(dot)ar> wrote:
> i have problems with encodings
PostgreSQL case conversion functions is a little bit buggy.
(Especially for Latin-N and Unicode encodings.) I've prepared a patch
[1] to fix a similar problem for Latin5 encoding. It wasn't tested so
much but works for your problem too:
template1=# CREATE DATABASE "testLatin" ENCODING = 'LATIN9';
CREATE DATABASE
template1=# \c testLatin
You are now connected to database "testLatin".
testLatin=# CREATE TABLE test
testLatin-# ( nombre varchar(20));
CREATE TABLE
testLatin=# COPY test FROM stdin;
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself.
>> maricón
>> ñañoso pícaro
>> \.
testLatin=# select * from test where upper(nombre) like 'ÑA%';
nombre
---------------
ñañoso pícaro
(1 row)
[1] You can find related patch (and discussion) @
http://archives.postgresql.org/pgsql-patches/2005-11/msg00173.php
address. It fixes case conversion problems for ILIKE, upper() and
lower() functions.
Regards.
From | Date | Subject | |
---|---|---|---|
Next Message | Markus Wollny | 2005-12-02 12:00:16 | 'AS' column-alias beign ignored on outer select |
Previous Message | Francesco Formenti - TVBLOB S.r.l. | 2005-12-02 10:51:35 | deadlock on the same relation |