Haskell HDBC-Sqlite3 always returns SqlByteString values

I am using the sqlite3 haskell HDBC driver to access the local sqlite3 database, which

PRAGMA encoding

is an

UTF-8

And as a result, for example, for

SELECT id, title FROM some_table

I always get this result:

[[SqlByteString "1", SqlByteString "\210\129\123\211"], ... ]

This is strange! Yes, the name contains "national" characters and yes, I'm sure it idhas a type INTEGER.

So the questions are:

  • Why is 1 unicode character treated as 2 ascii characters?
  • Why do integer columns result in validation values?
+3
source share
1 answer

SQLite - , . Haskellish, fromSql safeFromSql Database.HDBC.SqlValue.

+2

Source: https://habr.com/ru/post/1796659/


All Articles