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

From Tom Lane
Subject Re: Unicode UTF-8 table formatting for psql text output
Date
Msg-id 1168.1254256369@sss.pgh.pa.us
Whole thread Raw
In response to Re: Unicode UTF-8 table formatting for psql text output  (Roger Leigh <rleigh@codelibre.net>)
Responses Re: Unicode UTF-8 table formatting for psql text output
List pgsql-hackers
Roger Leigh <rleigh@codelibre.net> writes:
>> C locale means POSIX behavior and nothing but.

> Indeed it does.  However, making LC_CTYPE be UTF-8 rather than
> ASCII is both possible and still strictly conforming to the
> letter of the standard.  There would be some collation and
> other restrictions ("digit" and other character classes would
> be contrained to the ASCII characters compared with other UTF-8
> locales). However, any existing programs using ASCII would continue
> to function without any changes to their behaviour.  The only
> observable change will be that nl_langinfo(CODESET) will return
> UTF-8, and it will be valid for programs to use UTF-8 encoded
> text in formatted print functions, etc..

I really, really don't believe that that meets either the letter or
the spirit of the C standard, at least not if you are intending to
silently substitute LC_CTYPE=UTF8 when the program has specified
C/POSIX locale.  (If this is just a matter of what the default
LANG environment is, of course you can do anything.)
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Unicode UTF-8 table formatting for psql text output
Next
From: Robert Haas
Date:
Subject: Re: pg_hba.conf: samehost and samenet [REVIEW]