Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 531b98651d686c9f0affe0a56698b64a37b938713dc00e39821e3c25f8832b36
Ticket: c61818e4c9b710bdf9f947c1a40563aeab85357a
Tcl_UtfPrev flaws
User & Date: dgp on 2020-04-13 22:19:49
Changes

  1. icomment:
    
    Fixing the bugs in Tcl_UtfPrev in Tcl 8.5 involved restoring the use of
    the totalBytes array to control how each lead byte is handled. Early on
    that array was a straightforward lookup table of how many total bytes
    a complete, well-formed character should require in UTF-8 given the
    value of its lead byte.
    
    After the regression bug stopped the use of the totalBytes array by
    Tcl_UtfPrev, the only user has been Tcl_UtfComplete, and in Tcl 8.6
    the contents of the array have evolved away from the simple meaning
    to cater to only the (increasingly complex) needs of Tcl_UtfComplete.
    
    Now that the corrected Tcl_UtfPrev is trying to use the table again, those
    conflicting needs are a problem.
    
    That's why the bug fix merged to 8.6 is failing its tests.
    
    The most simple-minded fix may be two tables for two needs.  Not clear
    whether that raises its own set of synchronization issues.
    
  2. login: "dgp"
  3. mimetype: "text/plain"