SimpleHelpers.Net icon indicating copy to clipboard operation
SimpleHelpers.Net copied to clipboard

Possible issue with CheckForTextualData

Open g2petter opened this issue 7 years ago • 1 comments

I'm not sure if it's correct to report this as an issue, but I ran into a problem with the CheckForTextualData function, in particular this check:

else if (rawData[i - 1] == 0 && rawData[i] < 10) { ++controlSequences; }

The char represented by the number 9 is Tab. I'm working with an ERP system that requires export files to be Tab-separated, so when I passed in an exported string with lots of tabs, it failed to pass this test. The solution was to check rawData[i] < 9 instead of rawData[i] < 10

g2petter avatar Feb 16 '18 06:02 g2petter

Hi @g2petter , could you submit a PR with the fix and some test conditions?

khalidsalomao avatar Apr 19 '18 23:04 khalidsalomao