New answers tagged


character_set_server is not relevant. The setting on the database is just a default for when you CREATE TABLE without specifying a DEFAULT CHARACTER SET. You need The bytes in your client to be encoded utf8. The connection specifies utf8. If you are using mysqli, use mysqli_set_charset('utf8'). The column in the table must be CHARACTER SET utf8. Look ...


You can also set it as a default for any user or role (takes effect after a new connection is established): ALTER ROLE <rolename> SET client_encoding = 'UTF8';


You can either set the environment variable PGCLIENTENCODING in the operating system or include the set command in .psqlrc if you only need it for psql

Top 50 recent answers are included