I am using HDBC sqlite3 haskell driver to access local sqlite3 database which
PRAGMA encoding
is
UTF-8
And as result, for example for
SELECT id, title FROM some_table
I'm always getting the result like this:
[[SqlByteString "1", SqlByteString "\210\129\123\211"], ... ]
That's weird!
Yes, title contains 'national' symbols and yes, I'm sure that id has type of INTEGER.
So the questions are:
SQLite is an untyped database, so the fields in your database don't really have a type at all. You should be converting them to a more Haskellish value by using fromSql or safeFromSql from Database.HDBC.SqlValue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With