error invalid-utf8
Исходный текст не в UTF-8 или начинается с BOM.
What it means#
A source file MUST be UTF-8 without a byte-order mark and have the extension .oxl (§1.1). The lexer reports this code when the bytes are not well-formed UTF-8 (for example Latin-1 or UTF-16 text) or when the file starts with the BOM EF BB BF.
Example#
\u{FEFF}fn main() {} // <- invalid-utf8 (the file begins with the bytes EF BB BF)How to fix#
fn main() {}Re-save the file as UTF-8 without BOM. Most editors have an encoding option such as "UTF-8" as opposed to "UTF-8 with BOM". Text in other encodings must be converted first (for example with iconv -f latin1 -t utf-8).