Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/encoding: don't interpret file as UTF8 with binary encoding
Using, for example, `@embed(type=binary)` CUE would interpret the file's contents as UTF8. Since not all byte-sequences are valid UTF8, some will not be interpretable. Bytes sequences that fail to be properly interpreted will not raise an evaluation error but instead yield erroneus bytes to the evaluator. This change makes it so the file's contents will be passed to the evaluator verbatim by skipping the UTF8 decoder and reading directly from the filereader. Signed-off-by: nichtsundniemand <rufus.schaefing@gmail.com>
- Loading branch information