From: chenhj@cn.fujitsu.com
To: pgsql-bugs@postgresql.org
Subject: BUG #7664: Program using libpq and ecpglib can not output native language
Date: Fri, 16 Nov 2012 03:48:42 +0000
Message-ID: <E1TZCv4-0002iN-H0@wrigleys.postgresql.org> (raw)
The following bug has been logged on the website:
Bug reference: 7664
Logged by: Chen Huajun
Email address: chenhj@cn.fujitsu.com
PostgreSQL version: 9.1.6
Operating system: Linux
Description:
The error messages output by libpq or ecpglib is always be english. But my
expect is my native language.
Step:
1)compile my program which linked to libpq or ecpglib.
2)set my locale to native language.
set LANG=ja_JP.UTF-8
set LC_ALL=ja_JP.UTF-8
3)run my program and let it raise an error.
I knows reason. The default locale of a program is "C" in Linux,regardless
the Environment Variables.
if add the following line in my program,everything is OK.
setlocale(LC_ALL, "");
But I found no document tell users should do so.And I think it's not a easy
way.Can libpq and ecpglib do it for users?
*)Windows is OK.Solaris may has the same problem.
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: chenhj@cn.fujitsu.com
Subject: Re: BUG #7664: Program using libpq and ecpglib can not output native language
In-Reply-To: <E1TZCv4-0002iN-H0@wrigleys.postgresql.org>
References: <E1TZCv4-0002iN-H0@wrigleys.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox