SQLite Forum

null character sorts greater than 0x7f and less than 0x80
Login
Apparently TCL is encoding the \x00 character as two bytes: 0xc0 0x80.
You can see this if you do:

~~~~~
  puts [db eval {
    SELECT rowid, quote(CAST(v AS BLOB)) FROM t;
  }]
~~~~~