Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vVDtj-00GXl0-1o for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Dec 2025 19:06:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vVDti-001tc3-1L for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Dec 2025 19:06:19 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vVDti-001tbu-0P for pgsql-hackers@lists.postgresql.org; Mon, 15 Dec 2025 19:06:18 +0000 Received: from mail-yw1-x112f.google.com ([2607:f8b0:4864:20::112f]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vVDth-000piF-1S for pgsql-hackers@lists.postgresql.org; Mon, 15 Dec 2025 19:06:18 +0000 Received: by mail-yw1-x112f.google.com with SMTP id 00721157ae682-786a822e73aso35696837b3.3 for ; Mon, 15 Dec 2025 11:06:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1765825576; x=1766430376; darn=lists.postgresql.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=OaQ+BvWDY8T4Vp94S8mLPiNPxPe1sK89CHxi5gbNsMc=; b=ltelTPfk/UYFZhVWChSwfxPQIihc+dbqSa/ZdM0KMYCOgLmWGpkCMz+I46O6640ssf gu/xiqTmWr3ILEFb+ylddhn06iHT+LKg9cL693xKmiWRUiZsj3OWe4VSNznYCQGXzLK3 1knQbqEdrat7aCoZ/cWmRlKcYfk+O7FwtFDXWSHKczSkp7uVQWuyToFplvKkNgL4qX8+ yoouUGF87AJDGdtz6BviYAZicMRL3khfIaJwXKpyQGl9dCVr23pz7/RJCTtV3vqqUa7F nneSkM6oLylsWkziubJkhfK+8V5NNoAU847zN+19LFu3Y1tAX2COiCnJz0zinVIrvqHX oQ2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765825576; x=1766430376; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=OaQ+BvWDY8T4Vp94S8mLPiNPxPe1sK89CHxi5gbNsMc=; b=GyiZN/TjrVDvqvyhAy5h1whWzpFhDFihPV2lpFYCN8Hkd464tGDf7u3Nyz1IbbHaup hrIhakBMX6dRfxQK2AcWoU2tQEjpBsWJGjO7KeXGecS8qjEfLWDHw6VSN9eZ4imdfZHy BdIYoAMH8tTCzCrp3C9pwcs4S3Rc1OkVCz/dyh5K5+4UdiwnUDjorhViNDrrjMWUcFZV XJZnzE2laRr3rpLnG5cDRU/OkEqBKZnQN5Znl2GWKUtmG+886uizZUo4SKtTkaRPik7G tAju47ww0I+qND3kVjR1fRV6mu0hKqxG7SkEvvsP5KenWWH072KpwL+qD91eS3ntFjqe l/Cg== X-Gm-Message-State: AOJu0YwmE+yXb+EmhKPk+QHvNEwj6JpobLSGDE6uoXUxX/XdUD7nGKcz tlr+pZCRIudb3u9haMmxSoUmfb1sDbKSvGytpwIOjGVC8lEzoXcEReOh X-Gm-Gg: AY/fxX76/HvIXksxyLZQKwr/dqBLaUjtZlj+KidRYebThcm5z83Ya4gMDDfiNzcs2n0 g5bj3dy4MfR3hINkOTeAOk9p0JaXRPKnVCuyvL2WBpqBSah9J/Pr2E2YbdU7mLPaQqqc2QL20w0 OJCt3xIhKu7z+rEmMxuzw510KDRxwIT7flfjHV0v9YXRl+GvllWxPZ5r3+PgjQQhoW725EvWSzd 2dFYPYnfMU7Z1z+1CMQaRlFu3pl5ZSBOHsDQr9iRODwpJjduPWsJAjjJH+/tpdmee8j9YcjbrgD a0OlN2JMFb6yNBDf7+EBCJaPgcP26FjsQGfh0YePDmdPFsCpmwvHk9EJTzbZPgbGVcbRQERNUxY PbT5uV4mVo5Z01jQYXHXFSeJReaEyM87i6dPe2mE4JQNplQaoAsB9z/XDbAwA0d/R60tKL8Gk2D hFF2lU7lChAsoRrS98FAXUiOWTvEFqD2NXV55sfBNcPAa1MS/RtgS/L4pFnQWslDpR X-Google-Smtp-Source: AGHT+IHLq1ZFYOE2y71MiF9pwwGy+zJDRTgWbwzg11w719NGSpbLMhwmo7X2M0n1wzFtc4xIFXzMyQ== X-Received: by 2002:a05:690c:6a04:b0:788:c07:25d3 with SMTP id 00721157ae682-78e66d7d8e4mr100675537b3.19.1765825576121; Mon, 15 Dec 2025 11:06:16 -0800 (PST) Received: from ?IPV6:2600:1700:8952:80:404b:45ac:d270:bb24? ([2600:1700:8952:80:404b:45ac:d270:bb24]) by smtp.gmail.com with ESMTPSA id 00721157ae682-78e748ef7aasm30804867b3.18.2025.12.15.11.06.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 15 Dec 2025 11:06:15 -0800 (PST) Message-ID: Date: Mon, 15 Dec 2025 13:06:09 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: PRI?64 vs Visual Studio (2022) To: Tom Lane Cc: pgsql-hackers@lists.postgresql.org References: <20250331.152829.1921392690375275165.horikyota.ntt@gmail.com> <001bdc3b-ef94-4f24-b017-ac8ff0a2ea55@eisentraut.org> <1372793.1763519315@sss.pgh.pa.us> <1377512.1763522154@sss.pgh.pa.us> <1462038.1763567038@sss.pgh.pa.us> <1881391.1765782112@sss.pgh.pa.us> <1991599.1765818338@sss.pgh.pa.us> <2117910.1765823286@sss.pgh.pa.us> Content-Language: en-US From: Bryan Green In-Reply-To: <2117910.1765823286@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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