]> granicus.if.org Git - postgresql/commit
Set psql client encoding from locale by default
authorPeter Eisentraut <peter_e@gmx.net>
Sat, 19 Feb 2011 06:54:58 +0000 (08:54 +0200)
committerPeter Eisentraut <peter_e@gmx.net>
Sat, 19 Feb 2011 06:54:58 +0000 (08:54 +0200)
commit02e14562a806a96f38120c96421d39dfa7394192
treec2bdedb7a4646fe07b3b6ac49ccf50591075a920
parent327e0250716f12fe94b62669d25e572b40a8fba5
Set psql client encoding from locale by default

Add a new libpq connection option client_encoding (which includes the
existing PGCLIENTENCODING environment variable), which besides an
encoding name accepts a special value "auto" that tries to determine
the encoding from the locale in the client's environment, using the
mechanisms that have been in use in initdb.

psql sets this new connection option to "auto" when running from a
terminal and not overridden by setting PGCLIENTENCODING.

original code by Heikki Linnakangas, with subsequent contributions by
Jaime Casanova, Peter Eisentraut, Stephen Frost, Ibrar Ahmed
doc/src/sgml/libpq.sgml
doc/src/sgml/ref/psql-ref.sgml
src/bin/psql/command.c
src/bin/psql/startup.c
src/interfaces/libpq/.gitignore
src/interfaces/libpq/Makefile
src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/fe-protocol2.c
src/interfaces/libpq/fe-protocol3.c
src/interfaces/libpq/libpq-int.h