Maybe this is a question of some encoding switch that I have not set,
but I do not understand how I can influence the coding of the sql that
the 'tables' method
generates. The sql is built internally in sequel/adapters/shared/
sqlite.rb and results in an US-ASCII sql string that I have no direct
control over.
The sql is subsequently executed by the _execute method in sequel/
adapters/sqlite.rb. I have added a couple of lines to the beginning of
this method that expressly changes to coding to utf-8, and everything
works nicely with this hack:
def _execute(type, sql, opts, &block)
begin
STDERR.puts "in sequel/adapters/sqlite.rb, _execute: " +
sql.to_s + " " + sql.encoding.name
csql = sql
sql = csql.encode("utf-8")
STDERR.puts "in sequel/adapters/sqlite.rb, _execute: " +
sql.to_s + " " + sql.encoding.name
...
This is the debugging output:
in sequel/adapters/sqlite.rb, _execute: SELECT * FROM `sqlite_master`
WHERE (type = 'table' AND NOT name = 'sqlite_sequence') US-ASCII
in sequel/adapters/sqlite.rb, _execute: SELECT * FROM `sqlite_master`
WHERE (type = 'table' AND NOT name = 'sqlite_sequence') UTF-8
Again, thank you for your patience.
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.