Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 291e1bbe4f0ab99e72e30d2627d96cac10e46b4501b587d0fc70d1c671ff0913
Ticket: c61818e4c9b710bdf9f947c1a40563aeab85357a
Tcl_UtfPrev flaws
User & Date: dgp on 2020-04-06 21:13:45
Changes

  1. icomment:
    
    Both implementations presume that the routines
    
    p = Tcl_UtfPrev(p, bytes);
    
    p += TclUtfToUniChar(p, &ch);
    
    are inverses and take p back where it started. That is not true.
    
    Tcl_UtfPrev appears to be buggy handling nonconformant bytes
    like those in this demo, though it is hard to say because it is diffcult
    to untangle the docs and comments to decide just what Tcl_UtfPrev
    claims to be doing.
    
  2. login: "dgp"
  3. mimetype: "text/plain"