Re: Latest on CITEXT 2.0

From: "Marko Kreen" <markokr(at)gmail(dot)com>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Bruce Momjian" <bruce(at)momjian(dot)us>, "David E(dot) Wheeler" <david(at)kineticode(dot)com>, "Martijn van Oosterhout" <kleptog(at)svana(dot)org>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Latest on CITEXT 2.0
Date: 2008-07-01 16:07:32
Message-ID: e51f66da0807010907v2a9b3780r9e983e82440fd422@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 7/1/08, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> "Marko Kreen" <markokr(at)gmail(dot)com> writes:
> > ATM I'm looking at str_tolower/upper internal implementation.
> > They do:
> > workspace[curr_char] = towlower(workspace[curr_char]);
> > where workspace is wchar_t but towlower() operates on wint_t.
>
> IIRC this is exactly comparable to the type situation for the
> traditional <ctype.h> macros. The reason is that they are defined
> to accept EOF in addition to actual char (or wchar) values.

I read SUS v3 and there is no hint on multi-wchar anything,
so for unix systems you are right, wint_t == wchar_t.

Seems stories how Windows and Java operate have affected me too much.

Then I browsed MSDN:

http://msdn.microsoft.com/en-us/library/dtxesf6k.aspx

and they seem to strongly hint that wchar_t == 16 bits and
UTF-16 is used internally.

Probably some Windows developer should look into it
and decide if there is a #ifdef WIN32 branch needed.

--
marko

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2008-07-01 16:33:19 Re: PATCH: CITEXT 2.0
Previous Message Tom Lane 2008-07-01 15:43:07 Re: Latest on CITEXT 2.0