mholt / PapaParse

Fast and powerful CSV (delimited text) parser that gracefully handles large files and malformed input
http://PapaParse.com
MIT License
12.3k stars 1.14k forks source link

strip BOM when streaming chunk #1026

Open spearmootz opened 8 months ago

spearmootz commented 8 months ago

when parsing a CSV and using step, we stream the file but papaparse does not handle the BOM like it does when it is handling a string. so i moved the function stripBom to a place where it can be reused and then called the function on the first chunk only since it can only happen then.