Re: [bug fix] multibyte messages are displayed incorrectly on the client - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [bug fix] multibyte messages are displayed incorrectly on the client
Date
Msg-id 20131217184208.GH19059@momjian.us
Whole thread Raw
In response to [bug fix] multibyte messages are displayed incorrectly on the client  ("MauMau" <maumau307@gmail.com>)
Responses Re: [bug fix] multibyte messages are displayed incorrectly on the client
List pgsql-hackers
On Fri, Dec 13, 2013 at 10:41:17PM +0900, MauMau wrote:
> [Cause]
> While the session is being established, the server cannot use the
> client encoding for message conversion yet, because it cannot access
> system catalogs to retrieve conversion functions.  So, the server
> sends messages to the client without conversion.  In the above
> example, the server sends Japanese UTF-8 messages to psql, which
> expects those messages in SJIS.
> 
> 
> [Fix]
> Disable message localization during session startup.  In other
> words, messages are output in English until the database session is
> established.

I think the question is whether the server encoding or English are
likely to be better for the average client.  My bet is that the server
encoding is more likely correct.

However, you are right that English/ASCII at least will always be
viewable, while there are many server/client combinations that will
produce unreadable characters.

I would be interested to hear other people's experience with this.

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + Everyone has their own god. +



pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: planner missing a trick for foreign tables w/OR conditions
Next
From: Gavin Flower
Date:
Subject: Re: SSL: better default ciphersuite