Overview
| Artifact ID: | 28254a00d7dea154d8857a975e3ffccb63179e661132c96d1c9cc699b6f8e72e |
|---|---|
| Ticket: | 69634d51fb74551bb4dfcd0b4e9097679e8f4a05
handling out of range UCS4 values |
| User & Date: | dgp on 2020-04-29 15:40:29 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- 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.
- is_private changed to: "0"
- login: "dgp"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "dgp"
- subsystem changed to: "44. UTF-8 Strings"
- title changed to: "handling out of range UCS4 values"
- type changed to: "Bug"