Unicode strings: Difference between revisions

Content added Content deleted
(→‎{{header|Elixir}}: less subjective)
(add Zig)
Line 1,751: Line 1,751:


* How broad/deep does the language support Unicode? What encodings (e.g. UTF-8, UTF-16, etc) can be used? There is no inbuilt support for Unicode, but all encodings can be represented through hexadecimal strings. A decoder and output routine would need to be written, but this is easy to do on the Spectrum.
* How broad/deep does the language support Unicode? What encodings (e.g. UTF-8, UTF-16, etc) can be used? There is no inbuilt support for Unicode, but all encodings can be represented through hexadecimal strings. A decoder and output routine would need to be written, but this is easy to do on the Spectrum.

=={{header|Zig}}==

The encoding of a string in Zig is de-facto assumed to be UTF-8. Because Zig source code is UTF-8 encoded, any non-ASCII bytes appearing within a string literal in source code carry their UTF-8 meaning into the content of the string in the Zig program; the bytes are not modified by the compiler. However, it is possible to embed non-UTF-8 bytes into a string literal using \xNN notation.<ref>[https://ziglang.org/documentation/master/#String-Literals-and-Unicode-Code-Point-Literals Zig Documentation - String Literals and Unicode Code Point Literals]</ref>





{{omit from|GUISS}}
{{omit from|GUISS}}