Hello everyone, I'm trying to use ogr2ogr with a CSV file that uses semicolons as separator, but there is a field that contain one comma. The issue that I'm facing is that as it contains a comma, it originally takes the comma as separator, so it's not parsed correctly.
However, when trying to open the CSV file with another application it works like a charm, as the separator is correctly identified. I've been having a look at the function that identifies the separator, and it seems that if it finds two possible separators, it takes the comma as the right one. To double-check that, I executed the command in debug mode, and the following warning was shown: CSV: Inconsistent separator. ';' and ',' found. Using ',' as default In my humble opinion it makes sense to follow this approach if the separator is not clear, but in this case the first CSV line contains like 10 semicolons (the real separator) and just one comma. I believe that the actual behaviour could be improved adding some way of checking the most repeated separator. What do you think? -- *Moises Calzado* Support Engineer +34671264286 | mcalz...@carto.com | CARTO <https://www.carto.com/> <https://spatial-data-science-conference.com/2023/london/>
_______________________________________________ gdal-dev mailing list gdal-dev@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/gdal-dev