Package utffile provides two helper functions to transparently read files encoded as plain UTF8, UTF8 with BOM, UTF16-LE with BOM or UTF16-BE with BOM as if they were plain UTF8 files.
All files without a BOM are treated as UTF8 - this package does not support other encodings such as latin-1!
Wrap returns a reader that reads from the given reader and transforms the input into plain UTF8 as necessary. If the given reader was an io.ReadCloser, the returned reader also will be io.ReadCloser.