Re: Locale + encoding combinations

From: Dave Page <dpage(at)postgresql(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Locale + encoding combinations
Date: 2007-10-10 14:15:50
Message-ID: 470CDE96.8060500@postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Dave Page <dpage(at)postgresql(dot)org> writes:
>> OK so I added the appropriate entries (and posted the patch to
>> -patches), but my original question remains: why can I only select the
>> *default* encoding for the chosen locale, but not other ones that are
>> also be valid according to setlocale? Is this a bug, or is there some
>> technical reason?
>
> Well, the chklocale code is designed around the assumption that there
> *is* only one encoding for which a locale setting will work, with
> C/POSIX being a special case.
>
> I think we are talking a bit at cross-purposes here, because the Windows
> equivalent to this notion seems to be "English_United Kingdom.1252"
> whereas you seem to be defining locale as just "English_United Kingdom".
> Does it not work the way you want if you make the installer pass locale
> strings of the first form to initdb?

Yes, it seems it does (see my previous email to Peter):
http://archives.postgresql.org/pgsql-hackers/2007-10/msg00447.php

So I guess that's how I'll fix the installer. There is another issue
though as I mentioned in the post above - that it complains about an
invalid encoding specifier on the encoding name, then ignores it and
uses the default which seems wrong to me.

/D

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shane Ambler 2007-10-10 14:23:32 Re: Skytools committed without hackers discussion/review
Previous Message Tom Lane 2007-10-10 14:09:53 Re: Locale + encoding combinations