From 937a3d6ab1f7d730c741b213f60ed5f5f4cf2021 Mon Sep 17 00:00:00 2001 From: Russ Tyndall Date: Thu, 30 Jan 2014 21:50:51 -0500 Subject: [PATCH] Set default encoding for sqlite3 databases to utf-8 if unspecified --- ChangeLog | 9 +++++++++ db-sqlite3/sqlite3-sql.lisp | 6 ++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fad7f77..d875bec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2014-01-30 Russ Tyndall + * sqlite3-sql.lisp specify :utf-8 as the default encoding if there + is not one (allows :clsql-cffi to be closer to working for this + backend). + + I ran the test suite successfully once with :clsql-cffi, but there + after I got spurious errors and especially unrecoverable errors + while connecting about the database being locked + 2014-01-30 Russ Tyndall * sqlite3-sql.lisp, fddl.lisp Dont compare database-identifiers with invalid comparison operators diff --git a/db-sqlite3/sqlite3-sql.lisp b/db-sqlite3/sqlite3-sql.lisp index 8ce592c..4f953d0 100644 --- a/db-sqlite3/sqlite3-sql.lisp +++ b/db-sqlite3/sqlite3-sql.lisp @@ -205,11 +205,13 @@ (sqlite3:sqlite3-column-blob stmt i) (car types) :length (sqlite3:sqlite3-column-bytes stmt i) - :encoding (encoding database)) + :encoding (or (encoding database) + :utf-8)) (clsql-uffi:convert-raw-field (sqlite3:sqlite3-column-text stmt i) (car types) - :encoding (encoding database)))))) + :encoding (or (encoding database) + :utf-8)))))) (when field-names (setf col-names (loop for n from 0 below n-col collect (sqlite3:sqlite3-column-name stmt n)))) -- 2.34.1