On Sep 10, 4:15 pm, Per <[email protected]> wrote: > Setting: > win 7 > sqlite3 database in utf-16le format > sqlite3.dll 3.7.2 compiled from source fromwww.sqlite.org > sqlite3-ruby 2.2.3 compiled from source from rubyforge using the > instructions in the readme-file > gem install sequel > > Tested sqlite.dll in a C-program: works OK > Tested sqlite3-ruby with utf-8 encoded ruby source: works OK > > With sequel it does not work. This is the program: > # -*- coding: utf-8 -*- > require 'sequel' > > mm = Sequel.sqlite('MM.DB') > tbl = mm.tables > tbl.each { |t| puts t } > > I have included som debugging output at various levels down to > sqlite3.dll and there is a problem with encoding: sequel sends US- > ASCII code to sqlite3-ruby and it is not properly converted to utf-8/ > utf-16le along the line and ends up raising an SQL-error in > sqlite3.dll. > > Has anybody run across this problem and found a solution? > Thank you for your help.
Sequel does not modify encodings. If you are getting strings in encodings you don't expect, or the driver is raising an error because it isn't converting strings properly, the problem is at the database driver level. I'm guessing you have sqlite3-ruby 1.2.3, and you could try upgrading to 1.3.1 (gem install sqlite3-ruby) and see if that fixes it. If not, you should probably bring it up with the sqlite3- ruby maintainer. Thanks, Jeremy -- 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.
