Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 6dacdd0f62aad2b459046efbd8d0b5fd3789e82be2fa1b38058272c6647c3afc
Ticket: c61818e4c9b710bdf9f947c1a40563aeab85357a
Tcl_UtfPrev flaws
User & Date: dgp on 2020-04-08 17:43:27
Changes

  1. icomment:
    
    The two tests that still fail can be addressed by re-defining the result to be
    correct.  If we specify that Tcl_UtfPrev returns a pointer to a byte that
    
    1) will begin a character when scanning from start.
    2) May possibly be a character containing the byte (src - 1)
    3) Is the earliest such pointer >= start.
    
    This leaves open the possibility that 
    
    Tcl_UtfNext( Tcl_UtfPrev( src, start) )
    
    may return a result that is strictly less than src.
    
    We should look for any callers that do not expect that.
    
    Note that it cannot be expected that Tcl_UtfNext and Tcl_UtfPrev are precise
    inverses of each other if we also expect each of them to accept mid-character
    pointers as input, yet always produce lead-byte pointers as results.
    
  2. login: "dgp"
  3. mimetype: "text/plain"