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

Re: [Scheme-reports] Character/string case and the unicode module

Jeronimo Pellegrini scripsit:

> According to section 6.3.5 string-upcase, string-downcase and
> string-ci* procedures are in the (scheme unicode) module.
> But since section 1.3.1 mandates that modules are implemented in
> theor totality or not at all, then this means that an ASCII-only
> implementation cannot offer those procedures except if it provides the
> full Unicode module.

Implementing the (scheme unicode) module does not imply that you support
all of Unicode, or even any of it beyond ASCII.  It's simply that
routines in that module require certain mapping tables which are proper
or improper subsets of the Unicode mapping tables.  Consequently, if you
do not need these procedures, you do not need those tables.

IMHO the module ought to be renamed to avoid confusion.

> That's somewhat strange. (I also see that the predicate
> char-upper-case? in is (scheme base), while char-upcase for
> transforming characters is in (scheme unicode)).

That's an oversight.  Both should be in the ci-devant unicode module.

> If this is correct, then the programmer would have to write something
> like
> (import (scheme unicode))
> in order to use string-upcase (and char-upcase and lots of other
> procedures perfectly meaningful for), even though that implementation
> has no Unicode support.

Correct.  That ensures portability between implementations.

John Cowan                                   cowan@x
        "You need a change: try Canada"  "You need a change: try China"
                --fortune cookies opened by a couple that I know

Scheme-reports mailing list