nrinaudo / kantan.csv

CSV handling library for Scala
http://nrinaudo.github.io/kantan.csv/
Apache License 2.0
346 stars 36 forks source link

Help with identifying separator #307

Open sagard opened 2 years ago

sagard commented 2 years ago

I just started using kantan.csv. I'm trying to build an api to read a csv file. File uploaded can be semicolon, colon or tab separated.

Is there a way I can give a list of acceptable separators or what would be the best way to get the separator without manually reading the file and identifying the separator used?

nrinaudo commented 2 years ago

This is not something that kantan.csv supports, unfortunately. But we do allow you to use different CSV backends (commons-csv and jackson-csv). It's possible that one of these supports automatic separator detection. I'd look in that direction if I were you.