http://www.sqlite.org/c3ref/bind_blob.html states: | If any NUL characters occurs at byte offsets less than the value of the fourth parameter [of sqlite_bind_textXXX functions] then the resulting string value will contain embedded NULs. The result of expressions involving strings with embedded NULs is undefined. An old post from 2016 https://www.mail-archive.com/sqlite-users@mailinglists.sqlite.org/msg98258.html shows that some builtin function treat embedded nul chars as end of string. Others do not. I guess it is safe to store and retrieve text with embedded nuls. But not to "calculate" with them.