Stripped out most of the encoding support; a few issues to resolve with TEXT and BLOB handling