On 2018/05/01 4:20 PM, Simon Slavin wrote:
On 1 May 2018, at 3:01pm, Olivier Mascia <o...@integral.be> wrote:

My question was more generic, even though it didn't look that way: the well-known and (maybe too) 
much-used software tool named Excel tend to encourage people to export "CSV" files which 
are actually "SCSV" files (semi-colon separated values). So the need to script some data 
happens regularly.
What kind of insanity would lead someone to invent semi-colon delimited format 
when CSV already existed ?  I bet it was a badly-thought-out solution for 
European numeric formats which use a comma as a decimal point.  Tell whoever 
uses that format to stop.

*Sigh* If only...

There are only a couple of Countries using semi-colon list separators as far as I am aware, but the problem is that one of those is Holland - not exactly some third-World stow-away island that can be ignored. A lot of the things we make had to be Holland-friendly and so allowing semi-colon-happy CSV files became the norm.

I have successfully made a simple converter to read semi-colon CSV files (in fact, to detect which separator is used), and convert if needed, which does the trick, though it makes some important assumptions. (I'm willing to share if interested, but it's a Windoze CLI, mail me direct if needed).

To another post hating on Excel - Excel has many flaws, but this is not one of them, it's a fault of the list-separator setting in the Windows OS on which the Excel runs... It's also a flaw of software anyone may make, where it will produce one sort of output in one Country and a different kind in another, if you bother to use the locale settings. Also, the doubled-double-Quote char escaping is the law of the CSV standard, not of Excel, and backslash escaping is by no means more common or more or less correct. All of CSV and all of SQL use doubled-up quotes to escape strings - which must make it vastly more common than anything else.

To make matters worse, some enlightened Dutchmen realise this semi-colon insanity and so cleverly set their own computer's locale to use the comma in stead of the semi-colon. So now you cannot trust that it will use the semi-colon either - you HAVE to manually check and act accordingly.

Some other countries have other problems, like setting the decimal separator to a comma - imagine that in a CSV file - completely breaking it unless you cleverly Quote all the numeric values too, or ignore that local setting too....  Just silly.


I agree - someone needs to be shot for this. I just can't really figure out who.



_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to