![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
My DB is UTF8 and I cannot change it. When I try to insert accent letters like è ò ... I get 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 accents? |
#3
| |||
| |||
|
|
My DB is UTF8 and I cannot change it. When I try to insert accent letters like è ò ... I get 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 accents? |
#4
| |||
| |||
|
#5
| |||
| |||
|
|
Sorry I forgot to say I am running an Italian php website with a postgresql DB. Users can write messages eachothers. This is my code: $connessione_db = pg_connect("dbname=xxxxx user=yyyyy password=zzzzzz"); $sql_insert_messaggio="insert into messaggio (text) values ('Ã*èì');"; pg_exec ($connessione_db,$sql_insert_messaggio); |
|
and I get that error. If I do not write messages with accents everything works. |
|
If it possible I would avoid to use conversion strings, because if one day I have to move to another hosting I have to change my sciprts with the encode I will find. Is there a way to insert accents with any kind of encoding? |
#6
| |||
| |||
|
|
Sorry I forgot to say I am running an Italian php website with a postgresql DB. Users can write messages eachothers. This is my code: $connessione_db = pg_connect("dbname=xxxxx user=yyyyy password=zzzzzz"); $sql_insert_messaggio="insert into messaggio (text) values ('àèì');"; pg_exec ($connessione_db,$sql_insert_messaggio); and I get that error. If I do not write messages with accents everything works. If it possible I would avoid to use conversion strings, because if one day I have to move to another hosting I have to change my sciprts with the encode I will find. Is there a way to insert accents with any kind of encoding? |
#7
| |||
| |||
|
|
My DB is UTF8 and I cannot change it. When I try to insert accent letters like è ò ... I get 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 accents? |
#8
| |||
| |||
|
|
aaaawwww <aaaaw... (AT) libero (DOT) it> writes: My DB is UTF8 and I cannot change it. When I try to insert accent letters like è ò ... I get 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 accents? Use UTF8 character encoding in the terminal used to enter the accented characters. Or change the encoding by running the command "\set ENCODING ISO-8859-1" at the psql prompt before entering your data. |
![]() |
| Thread Tools | |
| Display Modes | |
| |