[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

An issue about ASCII-RANGE->CHAR-SET

This page is part of the web mail archives of SRFI 14 from before July 7th, 2015. The new archives for SRFI 14 contain all messages, not just those from before July 7th, 2015.



R5RS and all other procedures except ascii-range->char-set
proposed in srfi-14 are defined so that they don't assume
any specific character encoding.  For example, char->integer
may return different integer value from the same character
on different implementations.  So it is a bit weird for me
that the spec explicitly refer to the ascii encoding in
ascii-range->char-set.  

How about (integer-range->char-set LOWER UPPER), which
contains every character on which the result of applying
char->integer falls in the range of [LOWER, UPPER).
The result is dependent on the internal character representation
the implementation is using (but likely to be the same if you
limit LOWER and UPPER in the range of the ascii code).

I think char-set:ascii is fine, because it refers only to the
ascii character set, not the ascii encoding.

BTW, I prefer LIST->CHAR-SET to CHARS->CHAR-SET, for the former is
consistent with its argument.

--
Shiro KAWAI
  Square USA Inc.   Honolulu Studio R&D division
#"The most important things are the hardest things to say" --- Stephen King