Changes between Version 12 and Version 13 of UnicodeCowan


Ignore:
Timestamp:
08/26/12 23:49:49 (5 years ago)
Author:
cowan
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UnicodeCowan

    v12 v13  
    23235. The procedures `char-{alphabetic,numeric,whitespace,upper-case, lower-case}?` return `#t` if their arguments have the Unicode properties Alphabetic, Numeric, White_Space, Uppercase, or Lowercase respectively.  Note that many alphabetic characters (though no ASCII ones) are neither upper nor lower case. 
    2424 
    25 6. The `char-downcase` procedure, given an argument that forms the uppercase part of a Unicode upper/lower-case pair, must return the lowercase member of the pair, provided that both characters are supported by the Scheme implementation.  (Turkic casing pairs are ignored.)  If the argument is not the uppercase part of such a pair, it is returned. 
     256. The `char-downcase` procedure, given an argument that forms the uppercase part of a Unicode upper/lower-case pair, must return the lowercase member of the pair, provided that both characters are supported by the Scheme implementation.  (Language-specific casing pairs are ignored.)  If the argument is not the uppercase part of such a pair, it is returned. 
    2626 
    27277. The `char-upcase` procedure works the same way, ''mutatis mutandis''.  Note that many Unicode lowercase characters don't have uppercase equivalents. 
    2828 
    29 8. The `char-foldcase` procedure (an extension to R5RS) applies the Unicode simple case-folding algorithm to its argument (ignoring the Turkic mappings).  Mappings that don't accept or don't produce single characters are ignored. 
     298. The `char-foldcase` procedure (an extension to R5RS) applies the Unicode simple case-folding algorithm to its argument (ignoring language-specific mappings).  Mappings that don't accept or don't produce single characters are ignored. 
    3030 
    3131In an ASCII-only Scheme, this is equivalent to the `char-downcase` procedure. 
     
    353510. The `string<?` procedure and its relatives are not, '''contrary to R5RS''', required to be a lexicographical extension of the corresponding procedures for characters.  That allows strings to be compared in the native representation without conversion to Unicode.  It also allows, at the other end of the spectrum, fully internationalized ISO 14651 multilingual sorting.  Of course, the usual rules for ordering predicates apply:  `string=?` must be an equivalence relation, `string<?`, `string=`, and `string>?` must be trichotomous, and so on. 
    3636 
    37 11. The procedures `string-{up,down,fold}case` (from R6RS) apply the Unicode full uppercasing, lowercasing, and folding algorithms, respectively, to their arguments.  This may cause the result to differ in length from the argument.  What is more, a few characters have case-mappings that depend on the surrounding context.  For example, Σ (Greek capital sigma) normally downcases to σ (Greek small sigma), but at the end of a word it downcases to ς (Greek small final sigma) instead. 
     3711. The procedures `string-{up,down,fold}case` (from R6RS) apply the Unicode full uppercasing, lowercasing, and folding algorithms, respectively, to their arguments.  This may cause the result to differ in length from the argument.  [Optional: What is more, a few characters have case-mappings that depend on the surrounding context.  For example, Σ (Greek capital sigma) normally downcases to σ (Greek small sigma), but at the end of a word it downcases to ς (Greek small final sigma) instead.] 
    3838 
    3939For an ASCII-only Scheme, `string-upcase` is a straightforward application of `string-map` to `char-upcase`, and `string-{down,fold}case` are straightforward applications of `string-map` to `char-downcase`.