Overview
Artifact ID: | 9d2081a06d75c1c22dcd799e23ef8b9c93ecb4f8 |
---|---|
Ticket: | 8e1e31eac0fd6b6c4452bc108a98ab08c6b64588
lsort treats NUL chars strangely |
User & Date: | m7j4k9 2017-07-20 10:21:46 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
The NUL character is not collated correctly. The Tcl command below demonstrates that the NUL character is treated by lsort as if it had the bit value 0111 1111.1 -- that's right, as if it were between 127 and 128. % join [lsort [list \0.1 \7.2 a.3 z.4 \x7F.5 \x80.6 \xFF.7]] : .2:a.3:z.4:.5: .1:.6:ÿ.7 Only NUL seems to be treated this oddly as confirmed by: % for { set list {} ; set i 0 } { $i < 256 } { incr i } { lappend list [format %c.%02x $i $i] } % lsort $list
- foundin changed to: "8.6.6"
- is_private changed to: "0"
- login: "m7j4k9"
- priority changed to: "5 Medium"
- private_contact changed to: "19f06fe5054ecb07284f096bd2da5fdc29221e4e"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "m7j4k9"
- subsystem changed to: "17. Commands I-L"
- title changed to: "lsort treats NUL chars strangely"
- type changed to: "Bug"