[issue27752] CSV DictReader default dialect name 'excel' is misleading, as MS Excel doesn't actually use ', ' as a separator.

Antti Haapala report at bugs.python.org
Sat Aug 13 03:16:04 EDT 2016


Antti Haapala added the comment:

Excel's behaviour has always been locale-dependent. If the user's locale uses , as the decimal mark , then ; has been used as the column separator in "C"SV. However, even if you use autodetection with sniff, it is impossible to detect with 100 % accuracy, e.g, is the following csv row comma or semicolon separated:

    1,2;3;4,5;6,7;8;9

The dialect could be documented better though, as currently it simply says:

    The excel class defines the usual properties of an Excel-generated CSV file. It is registered with the dialect name 'excel'.

And there really should be a separate dialect for Excel-semicolon separated values, as a couple billion people would see ; in their CSV.

----------
nosy: +ztane

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


More information about the Python-bugs-list mailing list