BUG #2692: psql sends natively-localized strings to database without setting client_encoding first

From: "Sergiy Vyshnevetskiy" <serg(at)vostok(dot)net>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #2692: psql sends natively-localized strings to database without setting client_encoding first
Date: 2006-10-13 08:50:39
Message-ID: 200610130850.k9D8od8k045956@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 2692
Logged by: Sergiy Vyshnevetskiy
Email address: serg(at)vostok(dot)net
PostgreSQL version: 8.1.4
Operating system: FreeBSD-6 stable
Description: psql sends natively-localized strings to database
without setting client_encoding first
Details:

psql mixes natively-localized string in SQL commands without setting
client_encoding first. Looks like we _really_ need some code in configure
script to find acceptable native names for our database charsets.

%zsh 1 11:27 serg(at)serg p0 /home/serg
set | egrep -a '^LANG|^LC_|^MM_CHAR'
LANG=ru_RU.KOI8-R
MM_CHARSET=KOI8-R
%zsh 0 11:27 serg(at)serg p0 /home/serg
psql -l
ERROR: invalid byte sequence for encoding "UTF8": 0xe9cdd1
%zsh 1 11:27 serg(at)serg p0 /home/serg
psql -d postgres
SET
Welcome to psql 8.1.4, 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

#psql = serg(at)[local]:5432 postgres
\encoding KOI8
#psql = serg(at)[local]:5432 postgres
\l

| |
------------+----------+-----------
postgres | pgsql | UTF8
template0 | pgsql | UTF8
template1 | pgsql | UTF8
(: 3)

#psql = serg(at)[local]:5432 postgres

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2006-10-13 14:22:37 Re: BUG #2692: psql sends natively-localized strings to database without setting client_encoding first
Previous Message Sergiy Vyshnevetskiy 2006-10-12 19:50:27 Re: BUG #2685: Wrong charset of server messages on client