pg.ddx.io pgsql-hackers@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Bryan Green <dbryan.green@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: PRI?64 vs Visual Studio (2022)
Date: Mon, 15 Dec 2025 13:06:09 -0600
Message-ID: <b7d99342-07c3-4d50-af1d-a7b58d2631bd@gmail.com> (raw )
In-Reply-To: <2117910.1765823286@sss.pgh.pa.us >
References: <20250331.152829.1921392690375275165.horikyota.ntt@gmail.com >
<001bdc3b-ef94-4f24-b017-ac8ff0a2ea55@eisentraut.org >
<CA+hUKGJnmzTqiODmTjf-23yZ=E3HXqFTtKoyp3TF-MpB93hTMQ@mail.gmail.com >
<1372793.1763519315@sss.pgh.pa.us >
<CA+hUKGLzXzQcbjEHW08Z6g=mzBkpLtzSJ7Bt2S2XmxP1bwpq8A@mail.gmail.com >
<1377512.1763522154@sss.pgh.pa.us >
<e7b902aa-98ac-4d35-bae3-d7d282a938c2@eisentraut.org >
<1462038.1763567038@sss.pgh.pa.us >
<CA+hUKG+nMv9bmOcARaDFC6rG=SGWC=TwWSRLrxi29oGeRNKemg@mail.gmail.com >
<1881391.1765782112@sss.pgh.pa.us >
<CA+hUKGJaX3AcuKSdEUOZiWc+mzL=+dvGnbMqCvWGY22y6oh9Nw@mail.gmail.com >
<1991599.1765818338@sss.pgh.pa.us >
<c6379076-aabc-4ee8-920b-bd0d18bd2379@gmail.com >
<2117910.1765823286@sss.pgh.pa.us >
On 12/15/2025 12:28 PM, Tom Lane wrote:
> It'd be great to not need the assumption of es_ES being installed.
> However, I tried making a POSIX.po file and setting lc_messages to
> POSIX, and it didn't work. The msgfmt infrastructure seemed unfazed
> and installed a .mo file under $sharedir/locale/POSIX/LC_MESSAGES as
> I'd expect, but no translation happened (this on a Linux box). Same
> with 'C'. It did work if I set lc_messages to 'C.utf8', which is a
> known name according to this box's "locale -a", but this doesn't give
> me a warm feeling about this approach being a lot more portable than
> what we have. Any ideas?
My answer did not feel like it was right, so I checked multiple versions
and realized there is a check.
char *
DCIGETTEXT (const char *domainname, const char *msgid, ...)
{
// Get the locale name
categoryvalue = guess_category_value (category, categoryname);
if (categoryvalue != NULL
&& !(categoryvalue[0] == 'C' && categoryvalue[1] == '\0')
&& strcmp (categoryvalue, "POSIX") != 0)
{
// Only do translation if NOT "C" and NOT "POSIX"
retval = _nl_find_msg (...);
}
// For "C" and "POSIX", skip directly to returning msgid
return (char *) msgid;
}
C.utf8 works because it is not "C" so is treated as a real locale. Now
that I'm back into that code...looking it over in more detail to see
what might work...
--
Bryan Green
EDB: https://www.enterprisedb.com
view thread (41+ messages) latest in thread
Message-ID: <b7d99342-07c3-4d50-af1d-a7b58d2631bd@gmail.com>
Permalink: ../b7d99342-07c3-4d50-af1d-a7b58d2631bd@gmail.com/
Also on: postgresql.org/message-id/b7d99342-07c3-4d50-af1d-a7b58d2631bd@gmail.com
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: dbryan.green@gmail.com, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org
Subject: Re: PRI?64 vs Visual Studio (2022)
In-Reply-To: <b7d99342-07c3-4d50-af1d-a7b58d2631bd@gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox