<div dir="ltr">Hello everyone,<div><br></div><div>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.</div><div><br></div><div>However, when trying to open the CSV file with another application it works like a charm, as the separator is correctly identified.</div><div><br></div><div>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:</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">CSV: Inconsistent separator. ';' and ',' found. Using ',' as default</blockquote><div><br></div><div>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?</div><div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature">
    <strong>Moises Calzado</strong>
    <p style="margin-bottom:4px;margin-top:4px">
    Support Engineer
    </p>
    <p style="margin-bottom:20px;margin-top:4px">
    +34671264286 |    <a href="mailto:mcalzado@carto.com" target="_blank">mcalzado@carto.com</a>
    |    <a href="https://www.carto.com/" rel="nofollow" target="_blank">CARTO</a>
    </p>
    
        
        <a href="https://spatial-data-science-conference.com/2023/london/" rel="nofollow" target="_blank">
        <img src="https://storage.googleapis.com/carto-it-files/signature/SDSC-2023-LND_Signature-mail.jpg" height="50" width="516.656px">
        </a>
        

    </div></div></div>