Bug#676114: Ruby help needed (Was: Bug#676114: wordnet: FTBFS: debian/wn-for-goldendict.rb:465: invalid multibyte char (US-ASCII))

Dmitry E. Oboukhov unera at debian.org
Wed Jun 6 06:08:24 UTC 2012


> Per Andersson escreveu isso aí:
>> Please see the attached patch and try if it works.

> Heh, except that you missed other usages of the same pattern. Andreas,
> please try the attached patch.

> As Per explained, the problem is that in Ruby 1.8, a string is an array
> of bytes, so str[0] returns a number (the byte at position 0).  Ruby 1.9
> is fully encoding-aware, so a string is an array of characters and
> str[0] returns a string that is the first *character* in str.

> What I did was replacing the occurrences of str[0] with str.bytes.first
> to explicitly request the first *byte* in str.

> The resulting output when run with Ruby 1.9 is pretty much the same as
> the original version generates when run by Ruby 1.8, *except* for the
> ordering between lowercase and lowercase letters. Maybe that is due to
> some other detail, but understanding that script completely is too much
> for me. :)

> If that's not acceptable, you can also (at least for Wheezy) run the
> script from debian/rules with `ruby1.8` instead of `ruby` and build
> depend on ruby1.8 explicitly.


Hi, Andreas and the other people!

I see you have already patched the script. Sorry for my later
response: I'm very busy these days: I'm trying to change my job.
I will able to do something in week or two. Please don't drop packages
in the time :)

-- 

. ''`.                               Dmitry E. Oboukhov
: :’  :   email: unera at debian.org jabber://UNera@uvw.ru
`. `~’              GPGKey: 1024D / F8E26537 2006-11-21
  `- 1B23 D4F8 8EC0 D902 0555  E438 AB8C 00CF F8E2 6537
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/debian-science-maintainers/attachments/20120606/c470bc13/attachment.pgp>


More information about the debian-science-maintainers mailing list