Re: Support UTF-8 files with BOM in COPY FROM

Peter Eisentraut <peter_e@gmx.net>

From: Peter Eisentraut <peter_e@gmx.net>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Tatsuo Ishii <ishii@postgresql.org>, david@kineticode.com, itagaki.takahiro@gmail.com, pgsql-hackers@postgresql.org
Date: 2011-09-27T14:21:37Z
Lists: pgsql-hackers
On mån, 2011-09-26 at 21:49 +0300, Peter Eisentraut wrote:
> If I store a BOM in row 1, column 1 of my table, because,
> well, maybe it's an XML document or something, then it needs to be
> able to survive a copy out and in.  The only way we could proceed with
> this would be if we prohibited BOMs in all user-data. 

Alternative consideration: We could allow this in CSV format if we made
users quote the first value if it starts with a BOM.  This might be a
reasonable way to get MS compatibility.