SQLite Forum

length function for BLOB out of sync with documentation
Login
Thanks Keith, that's exactly what I was asking. 

Nice to know I can check for both objectives, although for the most part we use these kinds of checks as a double check that unacceptable values are caught by the Database if programming errors elsewhere in the system are not done correctly. In this case, we really did want characters, but the majority of our code was written for ASCI, and as we are moving to UTF8 for storage, we can no longer assume byte=character. 

It's going to take a lot of time for the development assumptions in a code base that's over 20 years old to be fully audited, as we don't have nearly the code testing and validation you have in SQLite.