Re: client encoding that psql command sets

From: "Tsubasa Sakamoto" <sakamoto(dot)tsubasa(at)ryobi(dot)co(dot)jp>
To: "'Adrian Klaver'" <adrian(dot)klaver(at)gmail(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: client encoding that psql command sets
Date: 2014-02-07 03:35:37
Message-ID: 006b01cf23b5$aad62f50$00828df0$@ryobi.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers

> Not sure that it makes a difference but the docs say psql looks at
> LC_CTYPE not LANG for Unix systems. You did not say what OS you are
> working on though from the examples I am guessing some form of Unix.

Thank you for the response.
Sorry, I had not indicated OS information.
OS information is the following:
Red Hat Enterprise Linux Server release 6.2 Kernel 2.6.32-220.el6.x86_64 on an x86_64

The reason which was being verified using the LANG environment variable, I thought that the value of a LANG environment variable was set as LC_CTYPE when the LC_CTYPE environment variable and the LC_ALL environment variable are not set up.

The LC_CTYPE environment variable was set up and re-verified.
The result of psql command is following.

[Result]
% setenv LC_CTYPE ja_JP.eucJP

% psql postgres -f test.txt -o result.txt EUC_JP

% psql postgres -f test.txt > result.txt
UTF8

% psql postgres -o result.txt < test.txt
UTF8

% psql postgres < test.txt > result.txt
UTF8

Even when a LC_CTYPE environment variable was set up, the result did not change.
What do you think?

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Reece Hart 2014-02-07 05:12:13 Re: password-less access, without using pg_hba
Previous Message John R Pierce 2014-02-07 02:42:31 Re: password-less access, without using pg_hba

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2014-02-07 03:36:09 Re: Retain dynamic shared memory segments for postmaster lifetime
Previous Message Hiroshi Inoue 2014-02-07 03:25:35 Re: narwhal and PGDLLIMPORT