Re: Trouble with error message encoding

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Darko Prenosil <darko(dot)prenosil(at)finteh(dot)hr>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Trouble with error message encoding
Date: 2003-09-10 17:20:48
Message-ID: Pine.LNX.4.44.0309101918400.1141-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)gmx(dot)net

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2003-09-10 17:49:02 Re: massive quotes?
Previous Message Alvaro Herrera 2003-09-10 17:20:40 Re: massive quotes?