Unanswered: Unable to insert accent letters by php
My DB is UTF8 and I cannot change it.
When I try to insert accent letters like è ò ... I get
Warning: pg_exec() [function.pg-exec]: Query failed: ERROR: invalid byte sequence for encoding "UTF8": 0xe82729 HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by "client_encoding"
How Can I insert into fields of tables words with accents?
The data you're inserting is not UTF-8. You'll need to manually convert the encoding in order to insert it. Your platform may provide some tools to do this (Linux has iconv), or you may be able to use one of PostgreSQL's built-in string functions.