Re: Problem of a server gettext message. - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Problem of a server gettext message.
Date
Msg-id 20363.1197324328@sss.pgh.pa.us
Whole thread Raw
In response to Re: Problem of a server gettext message.  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> When the server wants to send an error message to the client, it will
> convert them from the server to the client encoding.  The English
> messages are ASCII, so this will work, because server encodings are
> required to be ASCII compatible.  The result of the gettext calls,
> however, is encoded in EUC-JP, so the server will take the EUC-JP
> bytes and attempt to do a UTF-8 to SJIS conversion on them.  This will
> cause a crash.

The problem here basically comes from the fact that gettext looks to
LC_CTYPE to decide what encoding it's supposed to convert to (and I
suppose it punts when LC_CTYPE = C).  Does it have a way by which we
could override that, to tell it the actual DB encoding regardless
of the locale environment?
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: archive_command failures report confusing exit status
Next
From: Bruce Momjian
Date:
Subject: Re: Release Note Changes