@end deffn
@deffn procedure unicode-char? object
-Returns @code{#t} if @var{object} is a character corresponding to a
-Unicode scalar value, otherwise it returns @code{#f}. In other words,
-it is true for any character for which @code{char->integer} returns a
-value satisfying @code{unicode-scalar-value?}.
-
-Note that this is a bit of a misnomer since characters corresponding
-to Unicode ``noncharacter'' scalar values satisfy this predicate.
+Returns @code{#t} if @var{object} is any ``bitless'' character
+corresponding to a Unicode code point, except for those with general
+category @code{other:surrogate} or @code{other:not-assigned}.
@end deffn
@deffn procedure char-general-category char
\f
;;;; Unicode characters
-(define (unicode-char? object)
- (and (char? object)
- (let ((cp (char->integer object)))
- (and (fix:< cp char-code-limit)
- (not (utf16-surrogate? cp))))))
-
(define (unicode-scalar-value? object)
(and (unicode-code-point? object)
(not (utf16-surrogate? object))))
(lambda (char)
(and (bitless-char? char)
(char-in-set? char char-set)))))
- (register-predicate! predicate 'char-set-predicate '<= char?)
+ (register-predicate! predicate 'char-set-predicate
+ '<= bitless-char?)
predicate)))))
char-set))
(files "char")
(parent (runtime))
(export () deprecated:character
- (code->char integer->char)
- (wide-char? unicode-char?))
+ (code->char integer->char))
(export ()
8-bit-char?
ascii-char?