Problems with UTF8 in PSQL

Started by rolfalmost 20 years ago2 messagesbugs
Jump to latest
#1rolf
rolf.frogs@t-online.de

Hallo,

I don't know if the problem has been reported yet, but it seems to have more
implications.

- Prerequisite:
o PostgreSQL 8.1.4 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.0.4
20060507 (prerelease) (Debian 4.0.3-3)
o and psql
o A database which was created with -E UTF8
- Description:
If i log in into that database (client encoding is also in UTF8) a lot
of "\"-commands are not accepted and the error message says
"invalid byte sequence for UTF8...."

- Original output:
test=> \d
FEHLER: ungültige Byte-Sequenz für Kodierung »UTF8«: 0xfc6d6572220a
test=> \q

Same error message is in the log file

-Implications?
There are also problems in this field, if I try to add a constraint for a
primary key from inside of another programming language with the same
error message! So it could be a problem from PostqreSQL not from psql.

HTH to find the problem
Bye
rolf

#2Thomas Reiss
thomas.reiss@interieur.gouv.fr
In reply to: rolf (#1)
Re: Problems with UTF8 in PSQL

Hello,

When I experience the problem, the current Linux locale on my server is
fr_FR@euro. Psql works fine if I change the current locale (by setting
the LANG shell variable) to fr_FR@UTF-8.

I would be glad if psql may work fine without changing the LANG variable
in the current session.

Regards,
Thomas

rolf a ᅵcrit :

Hallo,

I don't know if the problem has been reported yet, but it seems to have more
implications.

- Prerequisite:
o PostgreSQL 8.1.4 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.0.4
20060507 (prerelease) (Debian 4.0.3-3)
o and psql
o A database which was created with -E UTF8
- Description:
If i log in into that database (client encoding is also in UTF8) a lot
of "\"-commands are not accepted and the error message says
"invalid byte sequence for UTF8...."

- Original output:
test=> \d
FEHLER: ungᅵltige Byte-Sequenz fᅵr Kodierung ᅵUTF8ᅵ: 0xfc6d6572220a
test=> \q

Same error message is in the log file

-Implications?
There are also problems in this field, if I try to add a constraint for a
primary key from inside of another programming language with the same
error message! So it could be a problem from PostqreSQL not from psql.

HTH to find the problem
Bye
rolf

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

--

Thomas REISS
Ministᅵre de l'Intᅵrieur et de l'Amᅵnagement du Territoire
SG/DSIC/SCSIC/DESP/BSTN
Tᅵl. : 01-61-44-25-90
E-mail: thomas.reiss@interieur.gouv.fr