CsvHelper icon indicating copy to clipboard operation
CsvHelper copied to clipboard

Validate Header generate a very large message.

Open Hieu-Nguyen-1 opened this issue 1 year ago • 2 comments

Describe the bug HeaderValidated() will generate a very large message when validating a file with encoding different from the configured encoding.

Expected behavior Remove the large message

Screenshots image

Hieu-Nguyen-1 avatar Apr 23 '24 08:04 Hieu-Nguyen-1

Do you mean a different CultureInfo? The delimiter is token from CultureInfo.TextInfo.ListSeparator. My guess is it's not finding a delimiter and is using that large text because of that.

This seems like a configuration issue to me.

JoshClose avatar Apr 24 '24 19:04 JoshClose

Do you mean a different CultureInfo? No, it's a different Encoding. In my case, my file is Unicode Encoding, my Csv Reader Config is UTF8 Encoding. image

My guess is it's not finding a delimiter and is using that large text because of that. -> Yes.

image

args.Context.Reader.HeaderRecord = all text of a file

Hieu-Nguyen-1 avatar Apr 25 '24 06:04 Hieu-Nguyen-1