13.1  Case mapping

The various case-mapping procedures of the (rnrs unicode (6)) library all operate in a locale-independent manner. The Unicode standard also offers locale-sensitive case operations, not implemented by the procedures from the (rnrs unicode (6)) library. While the library does not make available the full spectrum of case-related functionality defined by the Unicode standard, it does provide the most commonly used procedures. In particular, this strategy has allowed providing procedures mostly compatible with those provided by R5RS. (A minor exception is the case-insensitive procedures for string comparison. However, it is unlikely that this affects many existing programs.) Providing locale-sensitive operations would have meant significant novel design effort without significant precedent, which is why they are not part of R6RS.

The case-mapping procedures operating on characters are not sufficient for implementing case mapping on strings. For example, the upper-case version of the German “ß” in a string is “SS”. As char-upcase can only return a single character, it must return ß for ß. This limits the usefulness of the procedures operating on characters, but provides compatibility with R5RS sufficient for many existing applications. Moreover, it provides direct access to the corresponding attributes of the Unicode character database.