Re: Chinese translations not applied correctly on PostgreSQL 18 Windows
| От | elodie |
|---|---|
| Тема | Re: Chinese translations not applied correctly on PostgreSQL 18 Windows |
| Дата | |
| Msg-id | tencent_6BA137F0A6610F6857E7CBB609C024D1D705@qq.com обсуждение |
| Ответ на | Re: Chinese translations not applied correctly on PostgreSQL 18 Windows (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-bugs |
Thanks Tom! Setting
lc_messages = 'zh_CN' fixed the issue. The Chinese translations are now working well.Thanks and Best Regards!
Elodie Fu
Original
From: Tom Lane <tgl@sss.pgh.pa.us> Date: 2026-04-24 05:28 To: elodie <beifu23@foxmail.com> Cc: pgsql-bugs <pgsql-bugs@lists.postgresql.org> Subject: Re: Chinese translations not applied correctly on PostgreSQL 18 Windows |
> 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
В списке pgsql-bugs по дате отправления: