Re: psql blows up on BOM character sequence

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: Jim Nasby <jim(at)nasby(dot)net>, Merlin Moncure <mmoncure(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: psql blows up on BOM character sequence
Date: 2014-03-24 19:16:14
Message-ID: 19448.1395688574@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> I suspect suspect trying to do this in the parser will be quite messy.
> This needs to happen before the input is converted to the server
> encoding, I think.

Indeed --- what if the server isn't using utf8 internally?

And a larger point is that the server has no idea where the file
boundaries are. If we were to do this server-side, we'd essentially
end up discarding BOM anywhere, which is more libertine than I care
to be.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Merlin Moncure 2014-03-24 19:37:41 Re: psql blows up on BOM character sequence
Previous Message Andrew Dunstan 2014-03-24 18:59:50 Re: psql blows up on BOM character sequence