Meaning of char-numeric?
|Reported by:||cowan||Owned by:||cowan|
|Component:||WG1 - Core||Keywords:|
Description (last modified by cowan)
The current draft, like R6RS, defines char-numeric? according to the nonexistent Unicode Numeric property. That has to be fixed. Options:
- char-numeric? returns #t if the character's Numeric_Type property value is other than None. This means that many hanzi are both alphabetic and numeric.
- (Omitted, because it does not preserve IEEE Scheme)
- Define char-numeric? to return #t only for 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. This retains compatibility witht R5RS, and we can still use char-numeric? to parse numbers, and safely use (- (char->integer c) (char->integer #\0)) to obtain the digit value the character represents. (Note: R5RS programs that use char-numeric? to parse numbers will break if we adopt the current draft's definition of char-numeric?). Gauche, Gambit, and Chicken (without the utf8 egg) work like this.
- Define char-numeric? as equivalent to the Numeric_Digit property (general category value of Nd). Guile 2.0, Kawa, Larceny, Ypsilon, Mosh, and IronScheme? work like this.
- define char-numeric? as equivalent to the Number property (general category values of Nd, Nl, No). Scheme48, Chez, and Ikarus work like this.
Change History (4)
comment:3 Changed 6 years ago by cowan
- Owner changed from alexshinn to cowan
- Status changed from decided to writing