Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
From: Gaudenz Steinlin <gaudenz@soziologie.ch>
To: sup-devel <sup-devel@rubyforge.org>
Subject: [sup-devel] Encoding of message snippet in xapian
Date: Wed, 09 Feb 2011 22:27:13 +0100	[thread overview]
Message-ID: <1297286134-sup-7498@meteor.durcheinandertal.local> (raw)

Hi 

While debuging the trackeback posted below I discovered that my xapian
index contains some of the message snippets in ASCII-8BIT and others
in UTF-8. This leads to probelems when building the thread-view for
collapsed messages for messages wich have non 7-bit ASCII characters
in their snippet. message_patina_lines combines the snippet which
comes from the xapian index and is (sometimes) in ASCII-8BIT with
other parts of the message which are in UTF-8.

I don't know exactly how I ended up with a xapian index which has some
strings in ASCII-8BIT and others in UTF-8. I guess it's because I
first used sup with Ruby 1.8 and only recently switched to Ruby 1.9.1.
What's the expected encoding of things coming from the xapian index?
Is there a way to fix the index? Or is a fix in sup needed for this?
Or should I just recreate my index from scratch?

Running sup with Ruby 1.8 avoids the problem. But I guess it only
masks it because 1.8 is not encoding aware.

Gaudenz

--- Encoding::CompatibilityError from thread: load messages for thread-view-mode
incompatible character encodings: UTF-8 and ASCII-8BIT
/home/gaudenz/projects/sup/lib/sup/modes/thread-view-mode.rb:792:in `message_patina_lines'
/home/gaudenz/projects/sup/lib/sup/modes/thread-view-mode.rb:853:in `chunk_to_lines'
/home/gaudenz/projects/sup/lib/sup/modes/thread-view-mode.rb:724:in `block in regen_text'
/home/gaudenz/projects/sup/lib/sup/thread.rb:68:in `block in each'
/home/gaudenz/projects/sup/lib/sup/thread.rb:176:in `block (2 levels) in each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:176:in `block (2 levels) in each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:176:in `block (2 levels) in each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:176:in `block (2 levels) in each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:176:in `block (2 levels) in each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:176:in `block (2 levels) in each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:176:in `block (2 levels) in each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:176:in `block (2 levels) in each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:174:in `each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:176:in `block in each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:175:in `each'
/home/gaudenz/projects/sup/lib/sup/thread.rb:175:in `each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:176:in `block in each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:175:in `each'
/home/gaudenz/projects/sup/lib/sup/thread.rb:175:in `each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:176:in `block in each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:175:in `each'
/home/gaudenz/projects/sup/lib/sup/thread.rb:175:in `each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:176:in `block in each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:175:in `each'
/home/gaudenz/projects/sup/lib/sup/thread.rb:175:in `each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:176:in `block in each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:175:in `each'
/home/gaudenz/projects/sup/lib/sup/thread.rb:175:in `each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:176:in `block in each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:175:in `each'
/home/gaudenz/projects/sup/lib/sup/thread.rb:175:in `each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:176:in `block in each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:175:in `each'
/home/gaudenz/projects/sup/lib/sup/thread.rb:175:in `each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:176:in `block in each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:175:in `each'
/home/gaudenz/projects/sup/lib/sup/thread.rb:175:in `each_with_stuff'
/home/gaudenz/projects/sup/lib/sup/thread.rb:67:in `each'
/home/gaudenz/projects/sup/lib/sup/modes/thread-view-mode.rb:713:in `regen_text'
/home/gaudenz/projects/sup/lib/sup/modes/thread-view-mode.rb:175:in `buffer='
/home/gaudenz/projects/sup/lib/sup/buffer.rb:387:in `spawn'
(eval):1:in `spawn'
/home/gaudenz/projects/sup/lib/sup/modes/thread-index-mode.rb:120:in `block in select'
/home/gaudenz/projects/sup/lib/sup.rb:78:in `block in reporting_thread'
-- 
Ever tried. Ever failed. No matter.
Try again. Fail again. Fail better.
~ Samuel Beckett ~
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


             reply	other threads:[~2011-02-09 21:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-09 21:27 Gaudenz Steinlin [this message]
2011-02-17 14:42 ` Gaudenz Steinlin

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=1297286134-sup-7498@meteor.durcheinandertal.local \
    --to=gaudenz@soziologie.ch \
    --cc=sup-devel@rubyforge.org \
    /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