Burkhardt Renz <Burkhardt.Renz@mni.thm.de> writes:
> Encoding on Mac is okay:
> od -tx1
> ß
Works for me using a Terminal window in Yosemite:
pro:~ tgl$ export LANG=de_DE.UTF-8
pro:~ tgl$ locale charmap
UTF-8
pro:~ tgl$ psql regression
psql (9.6devel)
Type "help" for help.
regression=# create database de encoding 'utf8' lc_collate 'de_DE.UTF-8' lc_ctype 'de_DE.UTF-8' template template0;
CREATE DATABASE
regression=# \c de
You are now connected to database "de" as user "tgl".
de=# show client_encoding ;
client_encoding
-----------------
UTF8
(1 row)
de=# show server_encoding ;
server_encoding
-----------------
UTF8
(1 row)
de=# select 'ß'; -- made this by typing option-s
?column?
----------
ß
(1 row)
de=# select 'ß'::bytea;
bytea
--------
\xc39f
(1 row)
I surmise that you have wrong values for one or another of the settings
mentioned above.
regards, tom lane