Re: [bug fix] multibyte messages are displayed incorrectly on the client

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: MauMau <maumau307(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [bug fix] multibyte messages are displayed incorrectly on the client
Date: 2013-12-17 18:42:08
Message-ID: 20131217184208.GH19059@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ Everyone has their own god. +

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Gavin Flower 2013-12-17 18:47:04 Re: SSL: better default ciphersuite
Previous Message Simon Riggs 2013-12-17 18:34:09 Re: planner missing a trick for foreign tables w/OR conditions