Given the following input string:
(?i:\bsys\.user_catalog\b)
Stored into sqlite TEXT field. When retrieved with select, I get the following:
When doing simple command line, e.g.
$ sqlite3 databse.name "select a from b" > file.results
It appear in the editor like this:

When I use, python’s sqlite3 lib, it prints out as:
(?i:\x08sys\\.user_catalog\x08)
Questions are:
- Will switching to
BLOB, will solve this for me? - Is there a way to stay
TEXTand still get it done right.
Thanks in advance
A couple of ideas:
Make sure the string was originally input as raw so that the escaping doesn’t take place before you store it.
I think TEXT will work as well as BLOB but you may have to confirm by experiment.
Store as a buffer object:
c.execute('INSERT INTO documents VALUES (?, ?)', (somekey, buffer(yourstring)))