Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 671304cb3273df5ec36ad59567b888a06f26c1457bb60751a716dd61c5aa313e
Ticket: e617e8a71a00496e9ec682caa1b4e7b5b98c55a7
comparing UTF-16 strings doesn't account for surrogates
User & Date: dgp on 2020-04-27 21:14:27
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    ==== utf-25.5 Tcl_UniCharNcasecmp FAILED
    ==== Contents of test case:
    
    	teststringobj set 1 $one
    	teststringobj set 2 $two
    	teststringobj maxchars 1
    	teststringobj maxchars 2
    	set result [string compare -nocase [teststringobj get 1] [teststringobj get 2]]
    	if {$result eq [string map {< -1 = 0 > 1} $order]} {
    	    set result ok
    	} else {
    	    set result "'$one' should be $order '$two' (no case)"
    	}
    	set result
        
    ---- Result was:
    '￿' should be < '𐀀' (no case)
    ---- Result should have been (exact matching):
    ok
    ==== utf-25.5 FAILED
    
    
    
    ==== utf-25.6 Tcl_UniCharNcasecmp FAILED
    ==== Contents of test case:
    
    	teststringobj set 1 $one
    	teststringobj set 2 $two
    	teststringobj maxchars 1
    	teststringobj maxchars 2
    	set result [string compare -nocase [teststringobj get 1] [teststringobj get 2]]
    	if {$result eq [string map {< -1 = 0 > 1} $order]} {
    	    set result ok
    	} else {
    	    set result "'$one' should be $order '$two' (no case)"
    	}
    	set result
        
    ---- Result was:
    '￿' should be < '𐀀' (no case)
    ---- Result should have been (exact matching):
    ok
    ==== utf-25.6 FAILED
    
  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: "Important"
  11. status changed to: "Open"
  12. submitter changed to: "dgp"
  13. subsystem changed to: "44. UTF-8 Strings"
  14. title changed to:
    comparing UTF-16 strings doesn't account for surrogates
    
  15. type changed to: "Bug"