Re: Win32 unicode vs ICU

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Magnus Hagander" <mha(at)sollentuna(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org, "Palle Girgensohn" <girgen(at)pingpong(dot)net>
Subject: Re: Win32 unicode vs ICU
Date: 2005-08-23 16:03:44
Message-ID: 3044.1124813024@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

I wrote:
> (Just looking at it again, the code in convert_string_to_scalar is
> pretty bogus for multibyte encodings in any case. Possibly we need to
> rethink the whole approach.)

After studying this some more, I think the code is really so bogus for
any non-ASCII situation that it's probably not worth worrying about
too much. It's effectively assuming that the output of strxfrm() is
still in an ASCII-superset encoding ... but I don't see anything in
strxfrm's API that guarantees any such thing.

As long as strxfrm() doesn't fail completely for Windows Unicode,
I'd recommend just leaving this alone. As previously noted, the
worst that can happen is an estimation error that's bounded by the
histogram bin size anyhow.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2005-08-23 17:16:10 Re: Win32 unicode vs ICU
Previous Message Josh Berkus 2005-08-23 15:55:00 Re: Pre-allocated free space for row updating (like PCTFREE)

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2005-08-23 17:16:10 Re: Win32 unicode vs ICU
Previous Message Tom Lane 2005-08-23 13:48:25 Re: Win32 unicode vs ICU