BUG #7664: Program using libpq and ecpglib can not output native language

From: chenhj(at)cn(dot)fujitsu(dot)com
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #7664: Program using libpq and ecpglib can not output native language
Date: 2012-11-16 03:48:42
Message-ID: E1TZCv4-0002iN-H0@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

The following bug has been logged on the website:

Bug reference: 7664
Logged by: Chen Huajun
Email address: chenhj(at)cn(dot)fujitsu(dot)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.

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Stuart Bishop 2012-11-16 04:40:38 Re: BUG #7651: Superfluous calls to functions used for indexing
Previous Message Jeff Davis 2012-11-15 22:44:38 Re: BUG #7651: Superfluous calls to functions used for indexing