Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
I was checking the header fields of an external CSV file and noticed, that the file BOM is part of the first field when reading with csv.Reader.
The BOM is a bizarre idea in general, and it makes absolutely no sense when using UTF-8. It's not appropriate for encoding/csv to do anything special with a BOM. If you have to deal with it, deal it with before passing your reader to encoding/csv. If you have a file that is not UTF-8, you will to use a translating reader anyhow, as encoding/csv, like all Go code, expects UTF-8.
While it's true that U+FEFF is a space, the UTF-8 representation of U+FEFF is not the literal bytes FEFF.