Re: Migrating from UFFI to CFFI

Kevin Rosenberg <kevin-HJRc7zDS/[email protected]> Sat, 12 Oct 2013 06:30:30 -0700
Newsgroups gmane.lisp.clsql.general
Message-ID <[email protected]>
On Oct 10, 2013, at 1:51 AM, Victor <[email protected]> wrote:
> There were basically two issues with UFFI/CLSQL that I had.
> 
> The first problem is that SBCL crashed to ldb prompt unless the
> compiled UFFI binaries from the
> .cache/commmon-lisp/sbcl-1.1.12/... directory were removed before
> running sbcl with software that depends on CLSQL.  This problem
> somehow got solved by now. I suspect that it was caused by leftover
> binaries generated on previous versions of SBCL.

That directory path came from ASDF. Are you using ASDF3? I haven't
tried that version level.

> The second problem is that on ClozureCL v1.9 CLSQL-SQLITE3 corrupts
> unicode strings when they are read and stored to the database.
> 
> Settinguffi:*default-foreign-encoding* to :utf-8 solves the "read"
> part but strings are still corrupted when stored to the database.
> 
> Since the first problem is now gone (at least I hope so) the only
> remaining problem is with proper foreign encodings that will not
> corrupt UTF-8 strings.

If you are storing non-ASCII text, you'll want to ensure that
UFFI knows the encoding format that you are using.

There are limited encoding tests for UFFI in tests/i18n.lisp
and may reveal an issue with ClozureCL v1.9. I haven't used
that version of CCL. 

I'm away at conference, but will try to look at that on the plane
back home. You might also find someone who has identified a
solution on the CCL mail list. 

Kevin