Thank you for your answer.
I compiled v. 2.2.3 of sqlite3-ruby from source, and that is the only
sqlite3-ruby code on the machine.
As you can see from the code snippet in my first mail, I generate no
sql myself, only call the built-in sequel method "tables" to get a
list of the tables. This method expands internally to the sql-string
"SELECT * FROM `sqlite_master` WHERE (type = 'table' AND NOT name =
'sqlite_sequence')" which turns out to be in US-ASCII. The
documentation of the sqlite driver says "In the current implementation
of SQLite, the SQL parser only works with UTF-8 text." (http://
www.sqlite.org/version3.html), so it seems that it is the
responsibility of the calling functions to encode the sql in utf-8.
The small program below omits sequel and uses sqlite3-ruby directly.
It is encoded in utf-8, and the sql passes faultlessly through the
system and returns the list of tables.
------------------------------------
# -*- coding: utf-8 -*-
require 'sqlite3'
db = SQLite3::Database.new( "mm.db" )
db.execute("select name from sqlite_master where type='table'") do |
row|
p row
p row[0].encoding.name
end
db.close
------------------------------------
Thank you for looking into this.
Per
--
You received this message because you are subscribed to the Google Groups
"sequel-talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sequel-talk?hl=en.