Re: Unicode UTF-8 table formatting for psql text output - Mailing list pgsql-hackers

From Roger Leigh
Subject Re: Unicode UTF-8 table formatting for psql text output
Date
Msg-id 20090929171306.GC26000@codelibre.net
Whole thread Raw
In response to Re: Unicode UTF-8 table formatting for psql text output  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Unicode UTF-8 table formatting for psql text output
List pgsql-hackers
On Tue, Sep 29, 2009 at 12:01:30PM -0400, Tom Lane wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
> > On Mon, 2009-09-28 at 20:49 -0700, Brad T. Sliger wrote:
> >> pg_regress clears LC_ALL by default, but does not clear LANG
> >> by default.  Please find attached a patch that 
> >> causes pg_regress to also clear LANG by default.
> 
> > It probably doesn't matter much, but I think the proper fix would be to
> > unset LC_CTYPE.
> 
> Wouldn't we have to clear *all* of these variables to be sure?
> 
> The bigger question is exactly how we expect this stuff to interact with
> pg_regress' --no-locale switch.  We already do clear all these variables
> when --no-locale is specified.  I am wondering just what --locale is
> supposed to do, and whether selectively lobotomizing the LC stuff has
> any real use at all.

While this is currently just hypothetical, the code is also making the
assumption that the C locale is ASCII.  However, there is no guarantee
that this is the case.  ASCII is the minimal requirement, and UTF-8 is
a superset (according to SUS/POSIX).

In Debian, we do have plans to introduce a C.UTF-8 locale, and perhaps
eventually move the C locale to using UTF-8 by default, at which point
the tests would again fail because you would still get the UTF-8
formatting despite all of the LC_ etc. munging.  (At that point, we
would have a C.ASCII for compatibility.)


Regards,
Roger

--  .''`.  Roger Leigh: :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/`. `'   Printing on
GNU/Linux?      http://gutenprint.sourceforge.net/  `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
 


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Issues for named/mixed function notation patch
Next
From: Stephen Frost
Date:
Subject: Re: [PATCH] Reworks for Access Control facilities (r2311)