Previous: iklib chars unicode ascii, Up: iklib chars unicode [Index]
Latin-1 encoding uses 1 octet per character. For an itroduction to Latin-1 see:
and for Unicode’s “C1 Controls and Latin-1 Supplement” see:
Strictly speaking, the Latin-1 encoding only defines code points in the ranges ‘[#x20, #x7E]’ and ‘[#xA0, #xFF]’; notice that the control characters are excluded.
In the range ‘[#x20, #x7E]’ the Latin-1 code points are equal to the corresponding ASCII code points.
In both the ranges ‘[#x20, #x7E]’ and ‘[#xA0, #xFF]’: Latin-1’s code points are equal to Unicode’s code points, when we take into account Unicode’s “C1 Controls and Latin-1 Supplement”.
Notice that:
This library defines an extended Latin-1 encoding spanning the whole ‘[#x00, #xFF]’ range with the following blocks:
[#x00, #x1F] C0 Controls [#x20, #x7E] Latin-1 code points #x7F C0 Controls [#x80, #x9F] C1 Controls [#xA0, #xFF] Latin-1 code points
The following syntactic bindings are exported by the library
(vicare unsafe unicode)
. In the following macros the argument
latin-1-code-point is meant to be a fixnum representing a Latin-1
code point; while the argument unicode-code-point is meant to be a
fixnum representing a Unicode code point.
Evaluate to #t
if unicode-code-point is a Unicode code point
in a range that can be encoded in Latin-1; otherwise evaluate to
#f
.
Encode a Unicode code point into a Latin-1 code point.
Assum octet is the fixnum representation of an octet. Evaluate to
#t
if octet a valid Latin-1 code point; otherwise evaluate to
#f
.
Decode a Latin-1 code point to a Unicode code point.
Evaluate to #t
if the argument is a Latin-1 code point in the range
of C0 Control characters.
Evaluate to #t
if the argument is a Latin-1 code point in the range
of C1 Control characters.
Evaluate to #t
if the argument is a Latin-1 code point in the range
of C0 Control or C1 Control characters.
Evaluate to #t
if the argument is a Latin-1 code point in the range
of graphics (non–control) characters.
Previous: iklib chars unicode ascii, Up: iklib chars unicode [Index]