Answer the question
In order to leave comments, you need to log in
How to properly use UTF-8 in PostgreSQL?
There is a MySQL server and a local application that works with this server. Both operate on UTF-8 encoded data. Now we want to use PostgreSQL as a local data store for the application. But when you try to write data, the data is either written in crocozyabrs, or it gives the following error: "invalid byte sequence for encoding "UTF8": 0x00". I create databases in UTF-8 encoding.
PostgreSQL version - 9.3, runs on Win7.
What else could be the reason and what could be the solution?
Answer the question
In order to leave comments, you need to log in
Show the create script for the database
. It should be something like this:
CREATE DATABASE "somedb"
WITH OWNER = "someuser"
ENCODING = 'UTF8'
TABLESPACE = pg_default
LC_COLLATE = 'Russian_Russia'
LC_CTYPE = 'Russian_Russia'
CONNECTION LIMIT = -1;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question