[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sup-devel] Bug: UTF-8 error when sending messages



Tero Tilus <tero@tilus.net>:
> Adeel Ahmad Khan, 2011-01-29 05:11:
> >     invalid byte sequence in UTF-8
> ...
> > I am using a nearly fresh installation of Sup 0.12.1 with Ruby
> > 1.9.2p136.  I have LOCALE="en_US.UTF-8".
> 
> Both the errors were from regex matches against message body.  Somehow
> your editor doesn't know your locale or is not obeying it.  As a
> result non-utf8 stuff gets saved to disk and sup gets confused.

You were right.  It turned out to be an issue with editor.

Gaute Hope <eg@gaute.vetsj.com>:
> Excerpts from Adeel Ahmad Khan's message of 2011-01-29 04:11:40 +0100:
> >     --- ArgumentError from thread: main
> >     invalid byte sequence in UTF-8
> >     /usr/lib/ruby/gems/1.9.1/gems/sup-0.12.1/lib/sup/modes/edit-message-mode.rb:497:in `block in mentions_attachments?'
> 
> Could you try if this patch fixes it (or just edit the lines manually) ?

The patch resolved that error, but I get a different one now:

  --- ArgumentError from thread: main
  invalid byte sequence in UTF-8
  /usr/lib/ruby/gems/1.9.1/gems/sup-0.12.1/lib/sup/modes/edit-message-mode.rb:389:in `build_message'
  /usr/lib/ruby/gems/1.9.1/gems/sup-0.12.1/lib/sup/modes/edit-message-mode.rb:354:in `send_message'
  /usr/lib/ruby/gems/1.9.1/gems/sup-0.12.1/lib/sup/mode.rb:59:in `handle_input'
  /usr/lib/ruby/gems/1.9.1/gems/sup-0.12.1/lib/sup/buffer.rb:277:in `handle_input'
  /usr/lib/ruby/gems/1.9.1/gems/sup-0.12.1/bin/sup:260:in `<module:Redwood>'
  /usr/lib/ruby/gems/1.9.1/gems/sup-0.12.1/bin/sup:69:in `<top (required)>'
  /usr/bin/sup:19:in `load'
  /usr/bin/sup:19:in `<main>'

It looks like another regex match.

    m.body += "\n" unless m.body =~ /\n\Z/

In any case it seems to be my problem, not sup's.

Adeel
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel