Re: Patch for collation using ICU - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Patch for collation using ICU
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE6C742E@algol.sollentuna.se
Whole thread Raw
In response to Patch for collation using ICU  (Palle Girgensohn <girgen@pingpong.net>)
List pgsql-hackers
>> Is this patch ready for application?
>>
>>
>http://people.freebsd.org/~girgen/postgresql-icu/pg-802-icu-200
>5-05-06.d
>> iff.gz
>>
>> The web site is:
>>
>>     http://people.freebsd.org/~girgen/postgresql-icu/readme.html
>
>I don't think so, not quite. I have not had any positive
>reports from linux
>users, this is only tested in a FreeBSD environment. I'd say
>it needs some more testing.

I've just finished some simple testing on win32, and it does seem to work fine there as well, with a few modifications
tothe build step. As I don't have a  working autoconf, I applied the stuff that would come from your configure.in
changesdirectly to the files. Meaning putting USE_ICU in pg_config.h, and the following changes to Makefile.global: 
1) Add the directory for the ICU include files to CPPFLAGS
2) Add -licuuc -licuin to LIBS. I notice these are different names from those used on Unix, so a different configure
testwill be needed there. 
3) Add the icu lib directory to LDFLAGS
4) Remove encodings "PG_WIN_1258"/PG_TCVN and "IBM866"/PG_ALT. Didn't investigate further why this was needed, but this
probablyhas something to do with my tests being off CVS tip vs the patch being for 8.0-stable. 


After doing this, I can properly get upper and lowercase for the swedish characters åäö/ÅÄÖ, as well as the ß->SS
conversion.That's all I really tested at this point, but it did *not* work before in a unicode/UTF8 database. 

I've been working off the ICU 3.2 binaries available from the ICU page, the version compiled with MSVC 6 (because it
usesthe same runtime DLLs as stuff compiled with mingw. It should work with the MSVC7 version as well, but that would
introduceadditional DLL dependencies). 

//Magnus


pgsql-hackers by date:

Previous
From: Rod Taylor
Date:
Subject: Re: pl/pgsql enabled by default
Next
From: "Magnus Hagander"
Date:
Subject: Re: Patch for collation using ICU