Thread: Problems with UTF8 in PSQL

Problems with UTF8 in PSQL

From
rolf
Date:
Hallo,

I don't know if the problem has been reported yet, but it seems to have mor=
e=20
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=3D> \d
  FEHLER:  ung=FCltige Byte-Sequenz f=FCr Kodierung =BBUTF8=AB: 0xfc6d65722=
20a
  test=3D> \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

Re: Problems with UTF8 in PSQL

From
REISS Thomas DSIC DESP
Date:
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