Re: Solaris versus our NLS files - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Solaris versus our NLS files
Date
Msg-id CA+hUKG+a_4Y8-b7ukGb9RDX93eeEEcKyZ_ziDOLK6eODRCanNg@mail.gmail.com
Whole thread Raw
In response to Solaris versus our NLS files  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Solaris versus our NLS files
Re: Solaris versus our NLS files
List pgsql-hackers
On Wed, Dec 10, 2025 at 10:22 AM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> After some quality time with Google, I learned why: with Solaris's
> apparently-locally-hacked version of gettext, it's not good enough
> to have $INSTALLATION/share/locale/ subdirectories named like
> "es", "fr", etc.  They have to be named after the
> fully-spelled-out locale names like "es_ES.UTF-8".

Is it really locally hacked, or is it just Sun's libc[1], which
invented gettext() in the first place, and then later added GNU's
extensions and .mo format after GNU's reimplementation became
widespread?  From some (very) limited research on the topic, one thing
that GNU's reimplementation added that Sun's never had is the ability
to open a .mo with the wrong encoding and transcode it.  Perhaps that
explains Sun's insistence on finding an exact match, and I guess that
might mean that you could get either mojibake or some kind of error if
you create codesetless symlinks (which I guess it would normally only
use when your locale's name doesn't have the codeset suffix, and then
I guess it would expect Latin-9 or whatever it thinks "es_ES" has)?

[1] https://github.com/illumos/illumos-gate/tree/master/usr/src/lib/libc/port/i18n



pgsql-hackers by date:

Previous
From: Melanie Plageman
Date:
Subject: Re: Trying out read streams in pgvector (an extension)
Next
From: Sami Imseih
Date:
Subject: Re: [Proposal] Adding callback support for custom statistics kinds