Re: Trouble with error message encoding - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Trouble with error message encoding
Date
Msg-id Pine.LNX.4.44.0309101918400.1141-100000@peter.localdomain
Whole thread Raw
In response to Trouble with error message encoding  (Darko Prenosil <darko.prenosil@finteh.hr>)
List pgsql-hackers
Darko Prenosil writes:

>     I have encoding problems using translated error messages (7.4beta1).
> When database encoding is set to SQL_ASCII, all mesages arrive to client
> correctly respecting the CLIENT_ENCODING, but if I create database WITH
> ENCODING='unicode' or WITH ENCODING='latin2', messages are displayed
> correctly only when CLIENT_ENCODING is same as database encoding.
> I checked, and this is working this way also in 7.3. Is that known problem, or
> maybe I'm doing something wrong?

In general, the server encoding is S, the client encoding is C, and the
messages are stored (in the source, or in the PO files) in encoding M.
When the server sends a message to the client, it tries to convert a
string of encoding M, thinking it is in encoding S, to encoding C.  So,
yes, there is a problem, but it's not easy to fix.

-- 
Peter Eisentraut   peter_e@gmx.net



pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: massive quotes?
Next
From: Andrew Dunstan
Date:
Subject: Re: massive quotes?