Is it intentional that extralite always returns strings with a "ASCII-8BIT" encoding? I was trying to switch existing code from the sqlite3 gem to extralite and that's currently a blocker for me.
The following code snippet shows the difference in behavior between those two gems.
require "extralite"
require "sqlite3"
db = Extralite::Database.new("/tmp/extralite.db")
value = db.query_single_value("SELECT 'foo'")
puts "Extralite: #{value.encoding}"
db.close
db = SQLite3::Database.new("/tmp/sqlite3.db")
value = db.get_first_value("SELECT 'foo'")
puts "SQLite3: #{value.encoding}"
db.close
Is it intentional that
extralite
always returns strings with a "ASCII-8BIT" encoding? I was trying to switch existing code from thesqlite3
gem toextralite
and that's currently a blocker for me.The following code snippet shows the difference in behavior between those two gems.
It outputs the following:
Shouldn't
extralite
use UTF-8 by default as well?