Re: Support UTF-8 files with BOM in COPY FROM - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Support UTF-8 files with BOM in COPY FROM
Date
Msg-id 9978.1317058095@sss.pgh.pa.us
Whole thread Raw
In response to Re: Support UTF-8 files with BOM in COPY FROM  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Support UTF-8 files with BOM in COPY FROM
Re: Support UTF-8 files with BOM in COPY FROM
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> The thing that makes me doubt that is this comment from Tatsuo Ishii:
> TI> COPY explicitly specifies the encoding (to be UTF-8 in this case).  So
> TI> I think we should not regard U+FEFF as "BOM" in COPY, rather we should
> TI> regard U+FEFF as "ZERO WIDTH NO-BREAK SPACE".

Yeah, that's a reasonable argument for rejecting the patch altogether.
I'm not qualified to decide whether it outweighs the "we need to be able
to read Notepad output" argument.  I do observe that
http://en.wikipedia.org/wiki/Byte_order_mark
says Unicode 3.2 has deprecated the no-break-space interpretation,
but on the other hand you're right that we can't really assume that
the character is not present in people's data.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Support UTF-8 files with BOM in COPY FROM
Next
From: Robert Haas
Date:
Subject: Re: Support UTF-8 files with BOM in COPY FROM