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

From Itagaki Takahiro
Subject Support UTF-8 files with BOM in COPY FROM
Date
Msg-id CAJW2+qdYg1+xLaHDqnJs3AcKmCSVCDkv_LCAPWUtwmxL9dzVhQ@mail.gmail.com
Whole thread Raw
Responses Re: Support UTF-8 files with BOM in COPY FROM
Re: Support UTF-8 files with BOM in COPY FROM
Re: Support UTF-8 files with BOM in COPY FROM
List pgsql-hackers
Hi,

I'd like to support UTF-8 text or csv files that has BOM (byte order mark)
in COPY FROM command. BOM will be automatically detected and ignored
if the file encoding is UTF-8. WIP patch attached.

I'm thinking about only COPY FROM for reads, but if someone wants to add
BOM in COPY TO, we might also support COPY TO WITH BOM for writes.

Comments welcome.

--
Itagaki Takahiro

Attachment

pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: contrib/sepgsql regression tests are a no-go
Next
From: "David E. Wheeler"
Date:
Subject: Re: Support UTF-8 files with BOM in COPY FROM