Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 28254a00d7dea154d8857a975e3ffccb63179e661132c96d1c9cc699b6f8e72e
Ticket: 69634d51fb74551bb4dfcd0b4e9097679e8f4a05
handling out of range UCS4 values
User & Date: dgp on 2020-04-29 15:40:29
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    The valid range of unicode extends from U+0000 to U+10FFFF.  Routines
    that accept an int argument meant to represent a unicode code point have
    to decide how to handle a value of 0x110000 and above.  One example is
    the routine Tcl_UniCharIsGraph(), but there are many.
    
    Tcl 8.5 routes the handling to the inner workings of GetUniCharInfo(),
    which masks away unacceptable high bits.  This indicates that
    
    Tcl_UniCharIsGraph( 0x200041) will return 1 (masked to make \x41 "A") while
    Tcl_UniCharIsGraph( 0x200020) will return 0 (masked to make \x20 " ").  Since
    these are both invalid inputs, I think it would make more sense to have them
    produce the same results.  In many situations, invalid inputs are transformed
    into U+FFFD, the replacement character. That makes more sense to me.
    
    Moving forward through versions and variants, there are different handlings in place.
    In 8.7, there is masking of the output of routines like Tcl_UniCharToLower,
    when the constraint would seem to be more useful on what comes in instead
    of what goes out.
    
  5. is_private changed to: "0"
  6. login: "dgp"
  7. priority changed to: "5 Medium"
  8. resolution changed to: "None"
  9. severity changed to: "Minor"
  10. status changed to: "Open"
  11. submitter changed to: "dgp"
  12. subsystem changed to: "44. UTF-8 Strings"
  13. title changed to: "handling out of range UCS4 values"
  14. type changed to: "Bug"