Re: Should CSV parsing be stricter about mid-field quotes?

Поиск
Список
Период
Сортировка
От Joel Jacobson
Тема Re: Should CSV parsing be stricter about mid-field quotes?
Дата
Msg-id 7596ab36-6bba-48f8-9fe7-290327747f4f@app.fastmail.com
обсуждение исходный текст
Ответ на Re: Should CSV parsing be stricter about mid-field quotes?  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On Thu, May 18, 2023, at 08:35, Pavel Stehule wrote:
> Maybe there is another third implementation in Libre Office.
>
> Generally TSV is not well specified, and then the implementations are not consistent.

Thanks Pavel, that was a very interesting case indeed:

Libre Office (tested on Mac) doesn't have a separate TSV format,
but its CSV format allows specifying custom "Field delimiter" and
"String delimiter".

How peculiar, in Libre Office, when trying to write double quotation marks
(using Shift+2 on my keyboard) you actually don't get the normal double
quotation marks, but some special type of Unicode-quoting,
e2 80 9c ("LEFT DOUBLE QUOTATION MARK") and
e2 80 9d ("RIGHT DOUBLE QUOTATION MARK"),
and in the .CSV file you get the normal double quotation marks as
"String delimiter":

a,b,c,d,e
unquoted,“this field is quoted”,this “word” is quoted,"field with , comma",field with  tab

So, my "this field is quoted" experiment was exported unquoted since their
quotation marks don't need to be quoted.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Richard Guo
Дата:
Сообщение: Re: Assert failure of the cross-check for nullingrels
Следующее
От: "Wei Wang (Fujitsu)"
Дата:
Сообщение: RE: WL_SOCKET_ACCEPT fairness on Windows