Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: a1c0d6ee9fb2e9bb029ac9f0de90867a168edf2bb3ffc608a4a870e07a53d114
Ticket: 1b1f5f0b53e243d444628c8f414ea9664b5be44f
Tcl_UtfNext incompatibility in Tcl 8.6.10
User & Date: dgp on 2020-04-16 21:14:12
Changes

  1. icomment:
    
    Given the interface restriction, when Tcl_UtfNext gets the argument src,
    it cannot know whether it is safe to attempt to read src[-1].
    
    If src points to a trail byte, and we cannot read src[-1] and so on, there's
    no way to know whether we're on the 2d or 3d or 4th trail byte or just
    pointing to some malformed garbage we still haven't fully outlawed.
    
    Either we do the minimal thing which is step one byte forward always, (current answer,
    and the answer we've had in place for 20 years)
    or alternatively we could scan forward up to TCL_UTF_MAX-1 bytes and
    seek out the first non-trail byte, which would make the new test happier,
    but might introduce some synchronization troubles with other assumptions.
    
  2. login: "dgp"
  3. mimetype: "text/plain"