psql: set \encoding according to the current locale

Started by Martin Pittover 21 years ago2 messagesbugs
Jump to latest
#1Martin Pitt
martin@piware.de

Hi PostgreSQL developers!

Currently (i. e. in 7.4.6) psql seems to use the default database
encoding as locale for both its own messages and for database output
strings. Whereas it is only an inconvenience for the latter, psql's
own messages should really respect LANG/LC_MESSAGES environment
variables instead of the database encoding.

It would also be nice to call "set \encoding" to match the locale psql
was called under, at least when it is called interactively.

Thanks and have a nice day!

Martin

--
Martin Pitt http://www.piware.de
Ubuntu Developer http://www.ubuntulinux.org
Debian GNU/Linux Developer http://www.debian.org

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Martin Pitt (#1)
Re: psql: set \encoding according to the current locale

Am Sonntag, 31. Oktober 2004 22:59 schrieb Martin Pitt:

Currently (i. e. in 7.4.6) psql seems to use the default database
encoding as locale for both its own messages and for database output
strings. Whereas it is only an inconvenience for the latter, psql's
own messages should really respect LANG/LC_MESSAGES environment
variables instead of the database encoding.

That's what it does.

It would also be nice to call "set \encoding" to match the locale psql
was called under, at least when it is called interactively.

There is no portable interface to match locale encodings to PostgreSQL's
encoding names.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/