Hacker News new | past | comments | ask | show | jobs | submit login

Wow! That's a nifty little library. Just looking at the amount of options going into the main parser routine is mind blowing [1].

And the figuring out of encoding is also complex [2].

Once again, this is just to demonstrate that writing your own CSV parser from scratch is a total waste of time. Just use tools provided by your language. Many languages provide native support for CSV parsing. For example see docs for Microsoft C# [3].

----------

[1] https://github.com/pandas-dev/pandas/blob/v1.0.3/pandas/io/p...

[2] https://github.com/pandas-dev/pandas/blob/v1.0.3/pandas/io/p...

[3] https://docs.microsoft.com/en-us/dotnet/csharp/programming-g...




string.Split is far from native support.

If you don’t want to use third-party libraries then TextFieldParser[0] is part of the .NET framework.

I use CsvHelper[1] in my projects. It can do pretty much anything although the newer versions have some dependencies.

[0] https://docs.microsoft.com/en-us/dotnet/api/microsoft.visual...

[1] https://joshclose.github.io/CsvHelper/




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: