public inbox for [email protected]
help / color / mirror / Atom feedFrom: Tom Lane <[email protected]>
To: =?utf-8?B?ZWxvZGll?= <[email protected]>
Cc: =?utf-8?B?cGdzcWwtYnVncw==?= <[email protected]>
Subject: Re: Chinese translations not applied correctly on PostgreSQL 18 Windows
Date: Thu, 23 Apr 2026 17:28:55 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
"=?utf-8?B?ZWxvZGll?=" <[email protected]> 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
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: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: Chinese translations not applied correctly on PostgreSQL 18 Windows
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox