Skip site navigation (1) Skip section navigation (2)

Re: encoding of PostgreSQL messages

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: encoding of PostgreSQL messages
Date: 2008-12-31 09:46:56
Message-ID: 20081231094655.GA3599@merkur.hilbert.loc (view raw or flat)
Thread:
Lists: pgsql-general
On Mon, Dec 29, 2008 at 09:07:14AM -0300, Alvaro Herrera wrote:

> > That would not quite be enough -- I am talking about
> > messages reported *during* auth, say
> > 
> > 	FATAL: password authentication failed for user "postgres"
> > 
> > or
> > 
> > 	fe_sendauth: no password supplied
> > 
> > both of which, in other locales, may contain non-ASCII characters.
> 
> Those are sent in the server encoding IIRC (which admittedly you don't
> have a way to know, at that point.)
> 
> And I'm now wondering if we should delay initializing the translation
> stuff until after client_encoding has been reported.

Or else

- just don't pass those messages through gettext so they are
  always in 7 bit ASCII English

- do pass them through gettext but append a 7-bit ASCII
  filter so things do get passed in pseudo ASCII (this will
  work for many singlebyte encodings but more often than
  not for multibyte ones)

Both changes would be less intrusive than postponing the
translation.

If I had a choice I would opt for the first.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

In response to

Responses

pgsql-general by date

Next:From: Tom LaneDate: 2008-12-31 16:23:06
Subject: Re: encoding of PostgreSQL messages
Previous:From: Julius TuskenisDate: 2008-12-31 09:36:32
Subject: Re: Load Image File From PostgreSQL DB

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group