Next: , Previous: , Up: iklib chars unicode   [Index]


6.22.3.5 ASCII encoding

The following syntactic bindings are exported by the library (vicare unsafe unicode). In the following macros the argument octet is meant to be a fixnum representing an ASCII code point; while the argument code-point is meant to be a fixnum representing a Unicode code point.

Encoding

Syntax: ascii-code-point? code-point

Assume code-point is a fixnum representation of a Unicode code point. Return #t if code-point is in the range accepted by the ASCII encoding.

Syntax: ascii-encode code-point

Assume code-point is a fixnum representation of a Unicode code point in the range representable with ASCII encoding. Return its encoding in ASCII format.

Decoding

Syntax: ascii-octet? octet

Assume octet is a fixnum representing an octet. Return #t if octet is in the range accepted by the ASCII encoding; otherwise return #f.

Syntax: ascii-decode octet

Assume octet is the fixnum representation of an ASCII encoded character. Return its associated Unicode code point.