Re: Win32 unicode vs ICU

From: Palle Girgensohn <girgen(at)pingpong(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <mha(at)sollentuna(dot)net>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Win32 unicode vs ICU
Date: 2005-08-22 09:40:09
Message-ID: 78B90B1229BE2814D73F0E3E@rambutan.pingpong.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

--On lördag, augusti 20, 2005 12.17.47 -0400 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
wrote:

> [ moving to -hackers for wider discussion ]
>
> "Magnus Hagander" <mha(at)sollentuna(dot)net> wrote in
> http://archives.postgresql.org/pgsql-patches/2005-08/msg00039.php
>
>>> I've been working with Palles ICU patch to make it work on
>>> win32, and I believe I have it done. While doing it I noticed
>>> that ICU basically converts to UTF16 and back - I previously
>>> thought it worked on UTF8 strings. Based on this I also tried
>>> out an implementation for the win32-unicode problem that does
>>> *not* require ICU. It uses the win32 native functions to map
>>> to utf16 and back, and then to process the text there. And I
>>> got through with much less code than the ICU version, while
>>> doing the same thing.
>>>
>>> I am unsure of how to proceed. As I see it there are three paths:
>>> 1) Use native win32 functionality only on win32
>>> 2) Use ICU functionality only on win32
>>> 3) Allow both ICU and native functionality, compile time
>>> switch --with-icu (same as unix with the ICU patch)
>
> We need to figure out what we're going to do about this. Given where
> we are in the release cycle, I am pretty strongly tempted to just apply
> the smaller patch (just map utf8/utf16 using Windows native functions)
> for PG 8.1.
>
> I think that ICU would be interesting as the base for a much larger
> patch that gets us away from depending on libc's locale support at all
> (in particular, getting rid of the "one locale per database" problem).
> But it seems like a heck of a big dependency to incur for any lesser goal.
>
> I feel it makes sense to apply the smaller patch in any case, so that
> there's a Win32 solution not requiring ICU (ie, I can't see an argument
> for doing (2) rather than (3)).
>
> Comments?

I don't mind either way, but while Win32 will work with Magnus' patch,
FreeBSD won't; it needs the ICU patch to work. OTH, I maintain the FreeBSD
port where I already have the patch as an ("experiemental") option. Not
every FreeBSD user uses the ports system, though.

So, it is a question whether FreeBSD's unicode support is important or not,
I guess? Win32 will work both ways.

/Palle

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2005-08-22 10:30:17 Re: Missing CONCURRENT VACUUM (Was: Release notes for
Previous Message Dave Page 2005-08-22 07:30:01 Re: Sleep functions

Browse pgsql-patches by date

  From Date Subject
Next Message Petr Jelinek 2005-08-22 12:06:01 Re: PostgreSQL 8.0.3 and Ipv6
Previous Message Jeffrey W. Baker 2005-08-22 02:14:30 Re: data on devel code perf dip