DEVELOPMENT EDITION · 769442725406
Diagnostics Reference
On this page

B0005: character outside Latin-1 in a literal

Catalog status: active. Default severity: error. Stable name: non-latin1-literal. Family: Syntax and source text.

Verada's Character and String types are Latin-1, as in Ada, so a literal of one of them cannot contain a character outside Latin-1 (code points above 255). Wide_Character and Wide_String hold the first 65,536 code points, and Wide_Wide_Character and Wide_Wide_String all of them. Vibe's str holds any character. Identifiers and comments may use any Unicode letters.

Example (Vada)

   S : String := "π ≈ 3.14";

Example (Varc)

    let s: String = "π ≈ 3.14";

What to do

Declare the object with a wide type, S : Wide_Wide_String := "π ≈ 3.14";, and write it with Ada.Wide_Wide_Text_IO, or use Latin-1 characters only, for example "pi = 3.14".

Regression source and further reading

Complete regression example: source, command arguments and expected results. The fixture deliberately reproduces this diagnostic.

See syntax and source text, the code index, and diagnostic interpretation for modes, replay, fix-its and JSON.