ashinn / chibi-scheme

Official chibi-scheme repository
Other
1.23k stars 141 forks source link

(length (char-set->list char-set:letter)), the result is 132875 #794

Closed APIPLM closed 2 years ago

APIPLM commented 2 years ago

As eval (length (char-set->list char-set:letter)) in REPL after (import (srfi 14)). the result is 132875. That means it has 132875 number of letters as import srfi-14. But SRFI-14 said it add a few characters into the character set. Like Latin-1 char-set. As check in chicken,it has 117 number of characters.

ashinn commented 2 years ago

SRFI 14 doesn't specify a character set, and explicitly notes for instance that there may be characters in char-set:letter which are neither upper nor lowercase.

R7RS defines char-alphabetic? as equivalent to the Alphabetic property when applied to Unicode characters, which as of the Unicode version 13 distributed with Chibi includes 132875 characters.

It was not strictly necessary to make char-alphabetic? agree with char-set:letter, but not doing so is gratuitously confusing.

APIPLM commented 2 years ago

Thanks for your reply. Which R7RS you refer to , R7RS-small or R7RS-large?

APIPLM commented 2 years ago

And as well , I checked the linker Unicode13.0.0, the total number is 143,859 characters

ashinn commented 2 years ago

The small language, section 6.6, in the definition of char-alphabetic?.

The small language doesn't require full Unicode support, but does prescribe the behavior of char-alphabetic? when applied to Unicode characters.