DigiNews

Tech Watch by Johan Denoyer

← Back to articles

Nul Characters in Strings in SQLite

Quality: 8/10 Relevance: 9/10

Summary

SQLite allows NUL characters (ASCII 0x00, Unicode \\u0000) in the middle of string values. This can cause length() to stop at the first NUL, and the CLI dump to omit text after it, leading to confusion. The article shows how to detect them (CAST to BLOB, instr(b, char(0))) and how to remove them (UPDATE with substr and instr).

🚀 Service construit par Johan Denoyer