Skip to content
This repository was archived by the owner on Nov 19, 2020. It is now read-only.
This repository was archived by the owner on Nov 19, 2020. It is now read-only.

CSVReader Ignores specified delimiter #538

@PaulARoy

Description

@PaulARoy

Hi there!

First of all thanks for your awesome library.
I noticed that CSVReader completely ignores the delimiter (when specified on constructor) when we use ToMatrix() or ToTable().

This is due to ReadField() forcing a GuessDelimiterFromBuffer() on initialization: 
https://github.com/accord-net/framework/blob/development/Sources/Accord.IO/Csv/CsvReader.cs#L1090
https://github.com/accord-net/framework/blob/development/Sources/Accord.IO/Csv/CsvReader.cs#L1126

This GuessDelimiterFromBuffer() should not happen if delimiter was specified from constructor.

We noticed the issue because in french the double parser expects 0,12 (instead of 0.12), but reading the matrix 0,12;0,13 separates the entries according to ',' instead of specified ';'

I can make a PR on this issue if needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions