Re: Translations in the distributions - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Translations in the distributions
Date
Msg-id 200401092235.28964.peter_e@gmx.net
Whole thread Raw
In response to Re: Translations in the distributions  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Translations in the distributions
List pgsql-hackers
Tom Lane wrote:
> So the problem really occurs when database_encoding is set to an
> encoding that is incompatible with the one implied by the initdb-time
> LC_CTYPE ... which we have no good way to check.  Ugh.
>
> I have some vague recollection that glibc offers an API extension
> that allows this to be checked.  Is it worth having a solution that
> catches the problem on glibc only?

The problem is more likely to be that it will be hard to match up the 
different encoding names.  For example, if you set LC_CTYPE=C, then the 
system encoding is report as

$ locale charmap
ANSI_X3.4-1968

whereas the closest thing in PostgreSQL would be SQL_ASCII.

It might already help if we allowed LC_CTYPE to be attached to a 
database rather than the entire cluster, and make the user match them 
up manually.  The only drawback would be that indexes on global tables 
involving upper() or lower() would no longer work reliably.



pgsql-hackers by date:

Previous
From: "Merlin Moncure"
Date:
Subject: Re: Encoding problems in PostgreSQL with XML data
Next
From: Peter Eisentraut
Date:
Subject: Re: Encoding problems in PostgreSQL with XML data