Skip to content
Playground(another site)

bynk.fixture.invalid_encoding

Error A suite's fixture names a file that is not valid UTF-8.

A fixture becomes a String, which is Unicode text, so its file must be valid UTF-8. A file saved in another encoding, such as Latin-1, holds bytes that cannot be read as text. Re-save it as UTF-8. A file that holds a NUL byte is binary and is bynk.fixture.binary_content.

Example

fixture note = "fixtures/note.txt" // ✗ the file is Latin-1, not UTF-8
fixture note = "fixtures/note.txt" // ✓ once the file is saved as UTF-8

In the Book

See also

  • The grammar rule it governs: fixture_decl.
  • Every code in its category, Other, on the diagnostic index.
  • bynk explain bynk.fixture.invalid_encoding shows the same from the installed toolchain, without a network.