OxL Справочник OxL
РусскийEnglish

error invalid-utf8

error Стандарт: [§1.1]

Исходный текст не в 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#

oxl
\u{FEFF}fn main() {}     // <- invalid-utf8 (the file begins with the bytes EF BB BF)

How to fix#

oxl✓ проверяется в CI
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).

See also#

OxL 1.0.0-beta · Версия документации 1.0.0-beta© OxwaldLink · сгенерировано из Стандарта, исходников std и руководства