SQLite Forum

null character sorts greater than 0x7f and less than 0x80
Login
Until this issue is fixed, data stored in an SQLite database whose encoding is
ostensibly utf-8 is not necessarily actually valid utf-8.  Rather, a value
stored in the data base may be in Tcl's own internal representation.  This will
work mostly fine (except for the sorting issue) as long as the database is only
accessed through the Tcl interface, but other systems accessing the database
without the Tcl interface will get munged results.