Re: UTF8 with BOM support in psql - Mailing list pgsql-hackers

From David Christensen
Subject Re: UTF8 with BOM support in psql
Date
Msg-id 94DDAFD4-9A1F-4F8D-8F82-9E632EE5964F@endpoint.com
Whole thread Raw
In response to Re: UTF8 with BOM support in psql  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: UTF8 with BOM support in psql
List pgsql-hackers
On Oct 20, 2009, at 10:51 AM, Tom Lane wrote:

> Andrew Dunstan <andrew@dunslane.net> writes:
>> What I think we might sensibly do is to eat the leading BOM of an SQL
>> file iff the client encoding is UTF8, and otherwise treat it as just
>> bytes in whatever the encoding is.
>
> That seems relatively non-risky.

Is that only when the default client encoding is set to UTF8  
(PGCLIENTENCODING, whatever), or will it be coded to work with the  
following:

$ PGCLIENTENCODING=...nonutf8...
$ psql -f <file>

Where <file> is:
<BOM>
...

SET CLIENT ENCODING 'utf8';

...
EOF

Regards,

David
--
David Christensen
End Point Corporation
david@endpoint.com






pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Application name patch - v2
Next
From: Magnus Hagander
Date:
Subject: Re: Application name patch - v2