Next: , Previous: , Up: Characters   [Contents][Index]


5.2 Unicode

MIT/GNU Scheme implements the full Unicode character repertoire, defining predicates for Unicode characters and their associated integer values. A Unicode code point is an exact non-negative integer strictly less than #x110000. A Unicode scalar value is a Unicode code point that doesn’t fall between #xD800 inclusive and #xE000 exclusive; in other words, any Unicode code point except for the surrogate code points.

procedure: unicode-code-point? object

Returns #t if object is a Unicode code point, otherwise it returns #f.

procedure: unicode-scalar-value? object

Returns #t if object is a Unicode scalar value, otherwise it returns #f.

procedure: unicode-char? object

Returns #t if object is any character corresponding to a Unicode code point, except for those with general category other:surrogate or other:not-assigned.

procedure: char-general-category char
procedure: code-point-general-category code-point

Returns the Unicode general category of char (or code-point) as a descriptive symbol:

CategorySymbol
Luletter:uppercase
Llletter:lowercase
Ltletter:titlecase
Lmletter:modifier
Loletter:other
Mnmark:nonspacing
Mcmark:spacing-combining
Memark:enclosing
Ndnumber:decimal-digit
Nlnumber:letter
Nonumber:other
Pcpunctuation:connector
Pdpunctuation:dash
Pspunctuation:open
Pepunctuation:close
Pipunctuation:initial-quote
Pfpunctuation:final-quote
Popunctuation:other
Smsymbol:math
Scsymbol:currency
Sksymbol:modifier
Sosymbol:other
Zsseparator:space
Zlseparator:line
Zpseparator:paragraph
Ccother:control
Cfother:format
Csother:surrogate
Coother:private-use
Cnother:not-assigned

Next: Character Sets, Previous: Character implementation, Up: Characters   [Contents][Index]