Re: psql blows up on BOM character sequence - Mailing list pgsql-hackers

From Tom Lane
Subject Re: psql blows up on BOM character sequence
Date
Msg-id 19448.1395688574@sss.pgh.pa.us
Whole thread Raw
In response to Re: psql blows up on BOM character sequence  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: psql blows up on BOM character sequence  (Merlin Moncure <mmoncure@gmail.com>)
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.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



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: psql blows up on BOM character sequence
Next
From: Merlin Moncure
Date:
Subject: Re: psql blows up on BOM character sequence