Re: ruby-sqlite3 FTBFS
Hi,
El Domingo, 4 de mayo de 2014 16:06:50 Christian Hofstaedtler escribió:
> Upstream said something about LE vs. BE:
> https://github.com/sparklemotion/sqlite3-ruby/issues/128
If you look at s390x build log:
> Expected: "foo"
> Actual: "\u6600\u6F00\u6F00"
and then, reverse the bytes on each unicode codepoint like;
\u0066\u006F\u006F
you get: foo
> I currently don't have the time to look into this any deeper, so
> this is a call for help.
Maybe something like:
++ test_encoding.rb
- db = SQLite3::Database.new(':memory:'.encode('UTF-16LE'))
+ utf16 = ([1].pack("I") == [1].pack("N")) ? "UTF-16BE" : "UTF-16LE"
+ db = SQLite3::Database.new(':memory:'.encode(utf16))
++statement.c
if (UTF16_LE_P(value) || UTF16_BE_P(value)) {
But I'm unable to test it on my i386 machine :)
BTW, offending commit is https://github.com/sparklemotion/sqlite3-ruby/commit/f9005a2064cddd2f18eaeb0f2ca0a0c704df51a9
David
Reply to: