Re: [GENERAL] invalid byte sequence ? - Mailing list pgsql-hackers

From Martijn van Oosterhout
Subject Re: [GENERAL] invalid byte sequence ?
Date
Msg-id 20060825153040.GJ16535@svana.org
Whole thread Raw
In response to Re: [GENERAL] invalid byte sequence ?  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: [GENERAL] invalid byte sequence ?
List pgsql-hackers
On Fri, Aug 25, 2006 at 05:07:03PM +0200, Peter Eisentraut wrote:
> I got started on this and just wanted to post an intermediate patch.  I have
> taken the logic from initdb and placed it into libpq and refined the API a
> bit.  At this point, there should be no behaviorial change.  It remains to
> make libpq use this stuff if PGCLIENTENCODING is not set.  Unless someone
> beats me, I'll figure that out later.

Umm, why export all these functions. For starters, does this even need
to be in libpq? I wouldn't have thought so the first time round,
especially not three functions. The only thing you need is to take a
locale name and return the charset you can pass to PQsetClientEncoding.

In fact, the only thing you need is PQsetClientEncodingFromLocale(),
anything else is just sugar. Why would the user care about what the OS
calls it? We have a "pg_enc" enum, so lets use it.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Tricky bugs in concurrent index build
Next
From: "Matthew T. O'Connor"
Date:
Subject: Re: Autovacuum on by default?