Re: Latest on CITEXT 2.0 - Mailing list pgsql-hackers

From Marko Kreen
Subject Re: Latest on CITEXT 2.0
Date
Msg-id e51f66da0807010907v2a9b3780r9e983e82440fd422@mail.gmail.com
Whole thread Raw
In response to Re: Latest on CITEXT 2.0  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 7/1/08, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> "Marko Kreen" <markokr@gmail.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


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Latest on CITEXT 2.0
Next
From: "David E. Wheeler"
Date:
Subject: Re: PATCH: CITEXT 2.0