Thread: BUG #1328: psql don't accept some valid PGCLIENTENCODING values

BUG #1328: psql don't accept some valid PGCLIENTENCODING values

From
"PostgreSQL Bugs List"
Date:
The following bug has been logged online:

Bug reference:      1328
Logged by:          kaaos

Email address:      kaaos@land.ru

PostgreSQL version: 8.0 Beta

Operating system:   Linux kaaos 2.6.9 #3 Tue Nov 23 13:12:08 MSK 2004 i686
Intel(R) Celeron(R) CPU 1.70GHz GenuineIntel GNU/Linux

Description:        psql don't accept some valid PGCLIENTENCODING values

Details:

Hello!
First of all, sorry for my English :(.

The problem:
With PGCLIENTENCODING=KOI8 and server encoding UNICODE
psql do not starts and print this message:

  psql: FATAL:  invalid value for parameter "client_encoding": "KOI8"

But, if I unset PGCLIENTENCODING, and in psql enter:

  template1=# \encoding KOI8

then psql accept client encoding:

  template1=# \encoding
  KOI8

  template1=# show client_encoding;
   client_encoding
  -----------------
   KOI8
  (1 row)


'select version()' output: PostgreSQL 8.0.0beta5
 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.4.3

Thank you.

Re: BUG #1328: psql don't accept some valid PGCLIENTENCODING values

From
Tom Lane
Date:
"PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:
> With PGCLIENTENCODING=KOI8 and server encoding UNICODE
> psql do not starts and print this message:

>   psql: FATAL:  invalid value for parameter "client_encoding": "KOI8"

Odd ... it Works For Me:

$ PGCLIENTENCODING=KOI8 psql regression
Welcome to psql 8.0.0beta4, the PostgreSQL interactive terminal.

Type:  \copyright for distribution terms
       \h for help with SQL commands
       \? for help with psql commands
       \g or terminate with semicolon to execute query
       \q to quit

regression=# \encoding
KOI8
regression=#

What locale settings are you using?

            regards, tom lane

Re: BUG #1328: psql don't accept some valid PGCLIENTENCODING values

From
Tom Lane
Date:
"PostgreSQL Bugs List" <pgsql-bugs@postgresql.org> writes:
> With PGCLIENTENCODING=KOI8 and server encoding UNICODE
> psql do not starts and print this message:
>   psql: FATAL:  invalid value for parameter "client_encoding": "KOI8"

Found the problem ... it's something I broke last week :-(.  It's fixed
now in CVS tip.

            regards, tom lane