Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 383e9a20ab23688adf7596f78e4c9239a150864eda827066132ba2503cdbc21e
Ticket: dd010cadfb99cee6c0a38d1bd4f4927a4945f4ec
[string trim] mishandles surrogates
User & Date: dgp on 2020-04-06 14:42:19
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    Many expectations and invariants are violated.
    Trimming a string makes a longer string?
    Order of trimming left/right gives different results?
    
    % set orig \U1F4A9
    💩
    % set remove \U1F4AA
    💪
    % string length $orig
    2
    % string length [string trimleft $orig $remove]
    3
    % string length [string trimright $orig $remove]
    0
    % string length [string trim $orig $remove]
    3
    % string length [string trimleft [string trimright $orig $remove] $remove]
    0
    % string length [string trimright [string trimleft $orig $remove] $remove]
    3
    
  5. foundin changed to: "8.7"
  6. is_private changed to: "0"
  7. login: "dgp"
  8. priority changed to: "5 Medium"
  9. resolution changed to: "None"
  10. severity changed to: "Minor"
  11. status changed to: "Open"
  12. submitter changed to: "dgp"
  13. subsystem changed to: "10. Objects"
  14. title changed to: "[string trim] mishandles surrogates"
  15. type changed to: "Bug"