Skip site navigation (1) Skip section navigation (2)

Re: msvc++ build of 8.2.4 and encodings

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Charlie Savage <cfis(at)savagexi(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: msvc++ build of 8.2.4 and encodings
Date: 2007-08-30 03:22:19
Message-ID: 46D637EB.5000103@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-hackers

Charlie Savage wrote:
> Hope this is the right place for this post...
>
> I'm been trying out the msvc++ build scripts for postgresql 8.2.4 on 
> my development laptop (using window xp pro).
>
> I noticed the sort orders of queries changed.  Investigating more, 
> encodings don't seem to be working as expected.
>
> Using a MSVC++ build:
>
> > CREATE DATABASE test1 WITH ENCODING = 'utf8';
>
> > show all
>
> "lc_collate";"English_United States.1252"
> "lc_ctype";"English_United States.1252"
> "lc_messages";"C"
> "lc_monetary";"C"
> "lc_numeric";"C"
> "lc_time";"C"
>
> Using a MSYS build:
>
> > CREATE DATABASE test1 WITH ENCODING = 'utf8';
>
> > show all
>
> "lc_collate";"en_US.UTF-8"
> "lc_ctype";"en_US.UTF-8"
> "lc_messages";"C"
> "lc_monetary";"C"
> "lc_numeric";"C"
> "lc_time";"C"
>
> In both cases, the database clusters were created like this:
>
> initdb ---locale=c --encoding=utf8;
>
>

That seems most unlikely - without the superfluous dash it should set 
both lc_collate and lc_ctype to C.

Please try the following in both cases:

initdb --no-locale --encoding=utf8 data
pg_controldata data | grep LC_

If it doesn't show this:

LC_COLLATE:                           C
LC_CTYPE:                             C

then that's a bug. Or if after that you connect to the instance and 
"show lc_collate" or "show lc_ctype" don't likewise show C then that's a 
bug.

Are you by any chance loading a library that calls setlocale() ?

cheers

andrew


In response to

Responses

pgsql-hackers by date

Next:From: Joshua D. DrakeDate: 2007-08-30 03:28:13
Subject: Re: Some more msvc++ 8.2.4 build feedback
Previous:From: Charlie SavageDate: 2007-08-30 03:12:52
Subject: Re: msvc++ build of 8.2.4 and encodings

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group