3 ms·
golang builtin doesnt handle UTF BOM well . have to preprocess the io.Reader
by maerF0x0 6y ago
golang builtin doesnt handle UTF BOM well . have to preprocess the io.Reader
- slrz 6y agoSeems reasonable to me: this way, you don't have to duplicate the BOM stripping in the decoders of every single format you want to support. It's also more general as there are other commonly-needed transformations that have an even weaker case for explicit support in the CSV library (charset conversion, dropping other bogus bytes, ...).
- maerF0x0 6y agoit's a stark difference compared to, say, https://www.papaparse.com/ https://www.papaparse.com/ in javascript which pretty much does anything it can to parse a file