As guessed, the problem was with the client_encoding on the database.
crd_production=# show client_encoding;
client_encoding
-----------------
LATIN1
(1 row)
To change the client encoding to UTF-8, you need to do this
crd_production=# SET client_encoding = 'UTF8';
SET
Check again
crd_production=# show client_encoding;
client_encoding
-----------------
UTF8
(1 row)
Things work fine now.