[issue25857] csv: unexpected result

Ioan Fintescu report at bugs.python.org
Mon Dec 14 11:21:40 EST 2015


Ioan Fintescu added the comment:

There seems to be a CSV specification, namely IETF RFC 4180, and, as far as
I can tell, it indicates you are correct, and I am wrong.  Especially
points 5., 6., and 7 on page 3.  Here is a quote from 5 (RFC 4180, page 2
<https://tools.ietf.org/html/rfc4180#page-2>).

If fields are not enclosed with double quotes, then double quotes may not
> appear inside the fields.

It gets more specific in 6., and 7.

So the csv module is doing the right thing.  An error message may help,
though.

...muss

On Mon, Dec 14, 2015 at 9:05 AM, R. David Murray <report at bugs.python.org>
wrote:

>
> R. David Murray added the comment:
>
> Well, since there's no real standard for csv, it might have been.  Since
> it is iherently ambiguous according to "normal" csv rules, though, I'd say
> that if that is the case the originating spreadsheet is the one with the
> bug.  If you can prove there is a spreadsheet that uses this format,
> perhaps an enhancement request for csv would be in order.  I don't *think*
> there's any way to parse that with the existing dialect support, though I
> could be wrong.
>
> ----------
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue25857>
> _______________________________________
>

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25857>
_______________________________________


More information about the Python-bugs-list mailing list