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 1wG1bd-005o8U-16 for pgsql-bugs@arkaria.postgresql.org; Thu, 23 Apr 2026 21:29:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1wG1bc-003Hnj-1D for pgsql-bugs@arkaria.postgresql.org; Thu, 23 Apr 2026 21:29:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1wG1bc-003Hna-0P for pgsql-bugs@lists.postgresql.org; Thu, 23 Apr 2026 21:29:04 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wG1ba-00000002idX-01VR for pgsql-bugs@lists.postgresql.org; Thu, 23 Apr 2026 21:29:03 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 63NLSti51497614; Thu, 23 Apr 2026 17:28:56 -0400 From: Tom Lane To: "=?utf-8?B?ZWxvZGll?=" cc: "=?utf-8?B?cGdzcWwtYnVncw==?=" Subject: Re: Chinese translations not applied correctly on PostgreSQL 18 Windows In-reply-to: References: Comments: In-reply-to "=?utf-8?B?ZWxvZGll?=" message dated "Thu, 23 Apr 2026 10:03:32 +0800" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <1497612.1776979735.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Thu, 23 Apr 2026 17:28:55 -0400 Message-ID: <1497613.1776979735@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk "=?utf-8?B?ZWxvZGll?=" writes: > Steps to reproduce: > 1. Install PostgreSQL 18 on Windows > 2. Set environment: LANG=zh_CN, chcp 936 > 3. Run psql and execute: INSERT INTO tb (c) VALUES ('a\O\0'); Setting that environment variable isn't sufficient. It'll cause psql to translate messages that it generates locally, but to get translated messages from the server, you need to set the server's lc_messages parameter. I speak no Chinese, so I can't really read your example, but here's an example using French: $ LANG=fr_FR.utf8 psql psql (19devel) Saisissez « help » pour l'aide. postgres=# select 1/0; ERROR: division by zero postgres=# set lc_messages = 'fr_FR'; SET postgres=# select 1/0; ERREUR: division par zéro You can use any of the various ways of setting a server parameter to install that setting on a more permanent basis. regards, tom lane