Xo is experimental. The source is now public on GitHub, or try Xo in your browser.
Menu · XO1508

Docs

XO1508: an embedded Str is not UTF-8

error · reported by the checker

A Str holds UTF-8 text. A file with other bytes (an image, a compressed file, text in another encoding) embeds as Bytes.

Example

const LOGO: Str = embed("logo.png")

Fix

Declare the constant `Bytes`: `const LOGO: Bytes = embed("logo.png")`.

Run xo explain XO1508 for this text in a terminal, or see section 10.6 of the specification.