Re: Patch for collation using ICU

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Palle Girgensohn" <girgen(at)pingpong(dot)net>, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Patch for collation using ICU
Date: 2005-05-08 11:59:52
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE6C742E@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 to the build step. As I don't have a working autoconf, I applied the stuff that would come from your configure.in changes directly 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 test will 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 probably has 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 uses the same runtime DLLs as stuff compiled with mingw. It should work with the MSVC7 version as well, but that would introduce additional DLL dependencies).

//Magnus

Browse pgsql-hackers by date

  From Date Subject
Next Message Magnus Hagander 2005-05-08 12:22:05 Re: Patch for collation using ICU
Previous Message Rod Taylor 2005-05-08 11:39:33 Re: pl/pgsql enabled by default