Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: Andrei Thorp <garoth@gmail.com>
To: sup-talk@rubyforge.org, William Morgan <wmorgan-sup@masanjin.net>
Subject: Re: [sup-talk] Ruby 1.9: encodings
Date: Thu, 24 Dec 2009 11:43:30 -0500	[thread overview]
Message-ID: <80055d7c0912240843h38c0b1e9r5916829de8b510df@mail.gmail.com> (raw)
In-Reply-To: <1261246544-sup-7566@masanjin.net>

On Sat, Dec 19, 2009 at 1:34 PM, William Morgan
<wmorgan-sup@masanjin.net> wrote:
> Reformatted excerpts from Gaute Hope's message of 2009-12-18:
>> I just tried.. im getting the same, afraid im not skilled enough to
>> figure out what is wrong thou..
>
> Do the errors still occur if you apply this patch?
>
> diff --git a/lib/sup/util.rb b/lib/sup/util.rb
> index f99e1c1..92aaff4 100644
> --- a/lib/sup/util.rb
> +++ b/lib/sup/util.rb
> @@ -176,13 +176,7 @@ end
>  class String
>   ## nasty multibyte hack for ruby 1.8. if it's utf-8, split into chars using
>   ## the utf8 regex and count those. otherwise, use the byte length.
> -  def display_length
> -    if $encoding == "UTF-8" || $encoding == "utf8"
> -      scan(/./u).size
> -    else
> -      size
> -    end
> -  end
> +  def display_length; length end
>
>   def camel_to_hyphy
>     self.gsub(/([a-z])([A-Z0-9])/, '\1-\2').downcase
>
> --
> William <wmorgan-sup@masanjin.net>
> _______________________________________________
> sup-talk mailing list
> sup-talk@rubyforge.org
> http://rubyforge.org/mailman/listinfo/sup-talk
>

Nope, sorry. After deleting that function,

--- ArgumentError from thread: load threads for thread-index-mode
invalid byte sequence in US-ASCII
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup/person.rb:10:in `gsub'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup/person.rb:10:in `initialize'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup/xapian_index.rb:84:in `new'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup/xapian_index.rb:84:in
`block in build_message'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup/xapian_index.rb:86:in `map!'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup/xapian_index.rb:86:in
`build_message'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup/xapian_index.rb:176:in
`block (2 levels) in each_message_in_thread_for'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup/thread.rb:343:in `call'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup/thread.rb:343:in
`block in load_thread_for_message'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup/xapian_index.rb:176:in
`block in each_message_in_thread_for'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup/xapian_index.rb:176:in `each'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup/xapian_index.rb:176:in
`each_message_in_thread_for'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup/thread.rb:341:in
`load_thread_for_message'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup/thread.rb:333:in
`block in load_n_threads'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup/xapian_index.rb:151:in
`block in each_id_by_date'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup/xapian_index.rb:144:in
`block in each_id'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup/xapian_index.rb:144:in `each'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup/xapian_index.rb:144:in `each_id'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup/xapian_index.rb:151:in
`each_id_by_date'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup/thread.rb:328:in
`load_n_threads'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup/modes/thread-index-mode.rb:625:in
`load_n_threads'
(eval):12:in `load_n_threads'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup/modes/thread-index-mode.rb:609:in
`block in load_n_threads_background'
/usr/lib/ruby/gems/1.9.1/gems/sup-0.9.1/lib/sup.rb:77:in `block in
reporting_thread'

Though perhaps it would be easier for you to try out 1.9 + sup + utf8
for yourself? I'm sure you already have some UTF8 in your messages, so
you'd just need the new ruby. I have a feeling there are a lot of
small bugs and it may be a hassle doing debugging by proxy (though I'm
willing).

-AT
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk

  reply	other threads:[~2009-12-24 16:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-07  3:22 Andrei Thorp
2009-12-18 15:37 ` Gaute Hope
2009-12-19 18:34   ` William Morgan
2009-12-24 16:43     ` Andrei Thorp [this message]
2009-12-24 16:47       ` Andrei Thorp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80055d7c0912240843h38c0b1e9r5916829de8b510df@mail.gmail.com \
    --to=garoth@gmail.com \
    --cc=sup-talk@rubyforge.org \
    --cc=wmorgan-sup@masanjin.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox