public inbox for [email protected]  
help / color / mirror / Atom feed
From: =?utf-8?B?ZWxvZGll?= <[email protected]>
To: =?utf-8?B?VG9tIExhbmU=?= <[email protected]>
Cc: =?utf-8?B?cGdzcWwtYnVncw==?= <[email protected]>
Subject: Re: Chinese translations not applied correctly on PostgreSQL 18 Windows
Date: Fri, 24 Apr 2026 10:02:15 +0800
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>

Thanks Tom! Setting lc_messages = 'zh_CN'&nbsp;fixed the issue. The Chinese translations are now working well.


Thanks and Best Regards!


Elodie Fu




elodie
[email protected]



        



         Original
         
       
From: Tom Lane <[email protected]&gt;
Date: 2026-04-24 05:28
To: elodie <[email protected]&gt;
Cc: pgsql-bugs <[email protected]&gt;
Subject: Re: Chinese translations not applied correctly on PostgreSQL 18 Windows



       "=?utf-8?B?ZWxvZGll?="&nbsp;<[email protected]&gt;&nbsp;writes:
&gt;&nbsp;Steps&nbsp;to&nbsp;reproduce:
&gt;&nbsp;1.&nbsp;Install&nbsp;PostgreSQL&nbsp;18&nbsp;on&nbsp;Windows
&gt;&nbsp;2.&nbsp;Set&nbsp;environment:&nbsp;LANG=zh_CN,&nbsp;chcp&nbsp;936
&gt;&nbsp;3.&nbsp;Run&nbsp;psql&nbsp;and&nbsp;execute:&nbsp;INSERT&nbsp;INTO&nbsp;tb&nbsp;(c)&nbsp;VALUES&nbsp;('a\O\0');

Setting&nbsp;that&nbsp;environment&nbsp;variable&nbsp;isn't&nbsp;sufficient.&nbsp;&nbsp;It'll&nbsp;cause
psql&nbsp;to&nbsp;translate&nbsp;messages&nbsp;that&nbsp;it&nbsp;generates&nbsp;locally,&nbsp;but&nbsp;to&nbsp;get
translated&nbsp;messages&nbsp;from&nbsp;the&nbsp;server,&nbsp;you&nbsp;need&nbsp;to&nbsp;set&nbsp;the&nbsp;server's
lc_messages&nbsp;parameter.&nbsp;&nbsp;I&nbsp;speak&nbsp;no&nbsp;Chinese,&nbsp;so&nbsp;I&nbsp;can't&nbsp;really
read&nbsp;your&nbsp;example,&nbsp;but&nbsp;here's&nbsp;an&nbsp;example&nbsp;using&nbsp;French:

$&nbsp;LANG=fr_FR.utf8&nbsp;psql
psql&nbsp;(19devel)
Saisissez&nbsp;«&nbsp;help&nbsp;»&nbsp;pour&nbsp;l'aide.

postgres=#&nbsp;select&nbsp;1/0;
ERROR:&nbsp;&nbsp;division&nbsp;by&nbsp;zero
postgres=#&nbsp;set&nbsp;lc_messages&nbsp;=&nbsp;'fr_FR';
SET
postgres=#&nbsp;select&nbsp;1/0;
ERREUR:&nbsp;&nbsp;division&nbsp;par&nbsp;zéro

You&nbsp;can&nbsp;use&nbsp;any&nbsp;of&nbsp;the&nbsp;various&nbsp;ways&nbsp;of&nbsp;setting&nbsp;a&nbsp;server&nbsp;parameter
to&nbsp;install&nbsp;that&nbsp;setting&nbsp;on&nbsp;a&nbsp;more&nbsp;permanent&nbsp;basis.

			regards,&nbsp;tom&nbsp;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