fsprojects / FSharp.Data

F# Data: Library for Data Access
https://fsprojects.github.io/FSharp.Data
Other
806 stars 288 forks source link

Csv Column Inference ignores newline character #1483

Closed bonjune closed 1 year ago

bonjune commented 1 year ago

Changed the string reader in the parseHeaders function to erase newline characters before it runs inferences using the input schema.

This will resolve the issue: https://github.com/fsprojects/FSharp.Data/issues/952 .

A test to check this change is added. The test passes.

nightroman commented 1 year ago

I wonder, what about "\r\n"?

            use reader = new StringReader(schema.Replace("\n", ""))
bonjune commented 1 year ago

Oh, that's a valid point. I will make a patch.