Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 8b920ae5ee85656fdba8e7c0e9c4dfdebff9b5524e9cd7556bb6e1bd2b850c33
Ticket: 69634d51fb74551bb4dfcd0b4e9097679e8f4a05
handling out of range UCS4 values
User & Date: jan.nijtmans on 2020-04-29 16:17:05
Changes

  1. icomment:
    Whenever Tcl accept chars > \xFFFF, there's a UNICODE_OUT_OF_RANGE macro which checks for possible overflow. So there's no possibility for invalid lookup table access.
    
    For Tcl 8.5/8.6, the input 'integer' is masked using 16 bits. This is logical, since those functions are only defined accepting an Tcl_UniChar. In Tcl 8.7 that changes. For reasons of extensability, the input values are now masked using 21 bits. This allows bits 22 up to 31 to used for other purposes. For example Tcl_UniCharToUpper() could become locale-dependant: Uppercase 'i' in turkish is "İ", not "I".   The lowercase form of "I" is "ı", not "i".  So flags could be used in Tcl_UniCharToUpper()/Tcl_UniCharToLower() to indicate whether we want the Turkish variant or the rest-of-the-world variant.
    
    So, I don't think there's a bug here.
    
  2. login: "jan.nijtmans"
  3. mimetype: "text/plain"