NewCsvReader creates a csvReader from a given ReadCloser. The interpretation of the bytes of the supplied reader is a little murky. If there is a UTF8, UTF16LE or UTF16BE BOM as the first bytes read, then the BOM is stripped and the remaining contents of the reader are treated as that encoding. If
(r io.ReadCloser)
| 76 | // bytes go uninterpreted until we get to the SQL layer. It is currently the |
| 77 | // case that newlines must be encoded as a '0xa' byte. |
| 78 | func NewCsvReader(r io.ReadCloser) (*csvReader, error) { |
| 79 | return newCsvReaderWithDelimiter(r, ",") |
| 80 | } |
| 81 | |
| 82 | // newCsvReaderWithDelimiter creates a csvReader from a given ReadCloser, |r|, using |
| 83 | // the |delimiter| as the field delimiter in the parsed data. |