Without the BOM header check, this causes issues with CSV files that were made in a spreadsheet software and have BOM at the start. Causing the parser to read the first cell wrong. While it seems like nothing out of the ordinary, as it renders just fine. It adds an invisible character. Breaking any comparison checks. (such as if ("Language" == _csvArray[0][0]))
This fix implements a BOM header check. And if BOM is present, advances the buffer position head by 3 and modifies the size/word_start variables to compensate.
Without the BOM header check, this causes issues with CSV files that were made in a spreadsheet software and have BOM at the start. Causing the parser to read the first cell wrong. While it seems like nothing out of the ordinary, as it renders just fine. It adds an invisible character. Breaking any comparison checks. (such as
if ("Language" == _csvArray[0][0])
)This fix implements a BOM header check. And if BOM is present, advances the buffer position head by 3 and modifies the size/word_start variables to compensate.