On Sun, May 04, 2014 at 05:00:58PM +0200, David Suárez wrote:
> 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 :)
I tested these changes on s390x and they don't fix the problem :-(
--
Antonio Terceiro <terceiro@debian.org>
Attachment:
signature.asc
Description: Digital signature