Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
* [sup-devel] [issue36] label tab completion with utf-8 chars fail
@ 2009-12-25 14:02 Gaute Hope
  2010-01-03 15:51 ` Gaute Hope
  0 siblings, 1 reply; 11+ messages in thread
From: Gaute Hope @ 2009-12-25 14:02 UTC (permalink / raw)
  To: sup-devel


New submission from Gaute Hope <eg@gaute.vetsj.com>:

When trying to label a thread with a label containing unicode chars and pressing 
TAB I get this. When typing in the whole label manually it ads it with some 
minor glitches in the rendering of the message-line. When restarting sup I get a 
one space between the subject and the label that doesn't change background color 
when selected.

[2009-12-25 14:51:11 +0100] ERROR: oh crap, an exception
----------------------------------------------------------------
I'm very sorry. It seems that an error occurred in Sup. Please
accept my sincere apologies. If you don't mind, please send the
contents of /home/gaute/.sup/exception-log.txt and a brief report of the
circumstances to sup-talk at rubyforge dot orgs so that I might
address this problem. Thank you!

Sincerely,
William
----------------------------------------------------------------
--- Encoding::CompatibilityError from thread: main
incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string)
/home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:461:in `block (2 levels) in 
ask_many_with_completions'
/home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:461:in `select'
/home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:461:in `block in 
ask_many_with_completions'
/home/gaute/dev/ruby/sup.git/lib/sup/textfield.rb:75:in `call'
/home/gaute/dev/ruby/sup.git/lib/sup/textfield.rb:75:in `handle_input'
/home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:572:in `ask'
/home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:450:in 
`ask_many_with_completions'
/home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:519:in `ask_for_labels'
/home/gaute/dev/ruby/sup.git/lib/sup/util.rb:546:in `method_missing'
/home/gaute/dev/ruby/sup.git/lib/sup/modes/thread-index-mode.rb:536:in 
`edit_labels'
/home/gaute/dev/ruby/sup.git/lib/sup/mode.rb:52:in `handle_input'
/home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:266:in `handle_input'
bin/sup:244:in `<module:Redwood>'
bin/sup:67:in `<main>'

----------
messages: 97
nosy: gauteh
priority: bug
ruby_version: 1.9.1
status: unread
sup_version: git
title: label tab completion with utf-8 chars fail

_________________________________________
Sup issue tracker <sup-bugs@masanjin.net>
<http://masanjin.net/sup-bugs/issue36>
_________________________________________
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [sup-devel] [issue36] label tab completion with utf-8 chars fail
  2009-12-25 14:02 [sup-devel] [issue36] label tab completion with utf-8 chars fail Gaute Hope
@ 2010-01-03 15:51 ` Gaute Hope
  2010-01-03 15:56   ` Gaute Hope
  2010-01-03 16:07   ` [PATCH] utf-8 script encoding Rich Lane
  0 siblings, 2 replies; 11+ messages in thread
From: Gaute Hope @ 2010-01-03 15:51 UTC (permalink / raw)
  To: sup-devel


[-- Attachment #1.1: Type: text/plain, Size: 2451 bytes --]

This goes for tab completion with contacts containing UTF-8 chars.
Possibly other places as well.

Similar exception, see attached exception log.

- gaute

Excerpts from Gaute Hope's message of 2009-12-25 15:02:35 +0100:
> 
> New submission from Gaute Hope <eg@gaute.vetsj.com>:
> 
> When trying to label a thread with a label containing unicode chars and pressing 
> TAB I get this. When typing in the whole label manually it ads it with some 
> minor glitches in the rendering of the message-line. When restarting sup I get a 
> one space between the subject and the label that doesn't change background color 
> when selected.
> 
> [2009-12-25 14:51:11 +0100] ERROR: oh crap, an exception
> ----------------------------------------------------------------
> I'm very sorry. It seems that an error occurred in Sup. Please
> accept my sincere apologies. If you don't mind, please send the
> contents of /home/gaute/.sup/exception-log.txt and a brief report of the
> circumstances to sup-talk at rubyforge dot orgs so that I might
> address this problem. Thank you!
> 
> Sincerely,
> William
> ----------------------------------------------------------------
> --- Encoding::CompatibilityError from thread: main
> incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string)
> /home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:461:in `block (2 levels) in 
> ask_many_with_completions'
> /home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:461:in `select'
> /home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:461:in `block in 
> ask_many_with_completions'
> /home/gaute/dev/ruby/sup.git/lib/sup/textfield.rb:75:in `call'
> /home/gaute/dev/ruby/sup.git/lib/sup/textfield.rb:75:in `handle_input'
> /home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:572:in `ask'
> /home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:450:in 
> `ask_many_with_completions'
> /home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:519:in `ask_for_labels'
> /home/gaute/dev/ruby/sup.git/lib/sup/util.rb:546:in `method_missing'
> /home/gaute/dev/ruby/sup.git/lib/sup/modes/thread-index-mode.rb:536:in 
> `edit_labels'
> /home/gaute/dev/ruby/sup.git/lib/sup/mode.rb:52:in `handle_input'
> /home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:266:in `handle_input'
> bin/sup:244:in `<module:Redwood>'
> bin/sup:67:in `<main>'
> 
> ----------
> messages: 97
> nosy: gauteh
> priority: bug
> ruby_version: 1.9.1
> status: unread
> sup_version: git
> title: label tab completion with utf-8 chars fail
> 

[-- Attachment #1.2: exception-log.txt --]
[-- Type: text/plain, Size: 1366 bytes --]

--- Encoding::CompatibilityError from thread: main
incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string)
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/buffer.rb:476:in `block (2 levels) in ask_many_emails_with_completions'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/buffer.rb:476:in `select'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/buffer.rb:476:in `block in ask_many_emails_with_completions'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/textfield.rb:74:in `call'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/textfield.rb:74:in `handle_input'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/buffer.rb:578:in `ask'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/buffer.rb:472:in `ask_many_emails_with_completions'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/util.rb:547:in `method_missing'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/buffer.rb:548:in `ask_for_contacts'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/util.rb:547:in `method_missing'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/modes/compose-mode.rb:24:in `spawn_nicely'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/bin/sup:331:in `<module:Redwood>'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/bin/sup:78:in `<top (required)>'
/home/gaute/.gem/ruby/1.9.1/bin/sup:19:in `load'
/home/gaute/.gem/ruby/1.9.1/bin/sup:19:in `<main>'

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [sup-devel] [issue36] label tab completion with utf-8 chars fail
  2010-01-03 15:51 ` Gaute Hope
@ 2010-01-03 15:56   ` Gaute Hope
  2010-01-15 10:23     ` Gaute Hope
  2010-01-03 16:07   ` [PATCH] utf-8 script encoding Rich Lane
  1 sibling, 1 reply; 11+ messages in thread
From: Gaute Hope @ 2010-01-03 15:56 UTC (permalink / raw)
  To: sup-devel


[-- Attachment #1.1: Type: text/plain, Size: 4219 bytes --]

Apparently I can't even send messages when I enter the UTF-8 email address
manually. sup fails after having edited message and returning to the
edit message view. Attached is the exception log.

- gaute

Excerpts from Gaute Hope's message of 2010-01-03 16:51:55 +0100:
> This goes for tab completion with contacts containing UTF-8 chars.
> Possibly other places as well.
> 
> Similar exception, see attached exception log.
> 
> - gaute
> 
> Excerpts from Gaute Hope's message of 2009-12-25 15:02:35 +0100:
> > 
> > New submission from Gaute Hope <eg@gaute.vetsj.com>:
> > 
> > When trying to label a thread with a label containing unicode chars and pressing 
> > TAB I get this. When typing in the whole label manually it ads it with some 
> > minor glitches in the rendering of the message-line. When restarting sup I get a 
> > one space between the subject and the label that doesn't change background color 
> > when selected.
> > 
> > [2009-12-25 14:51:11 +0100] ERROR: oh crap, an exception
> > ----------------------------------------------------------------
> > I'm very sorry. It seems that an error occurred in Sup. Please
> > accept my sincere apologies. If you don't mind, please send the
> > contents of /home/gaute/.sup/exception-log.txt and a brief report of the
> > circumstances to sup-talk at rubyforge dot orgs so that I might
> > address this problem. Thank you!
> > 
> > Sincerely,
> > William
> > ----------------------------------------------------------------
> > --- Encoding::CompatibilityError from thread: main
> > incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string)
> > /home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:461:in `block (2 levels) in 
> > ask_many_with_completions'
> > /home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:461:in `select'
> > /home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:461:in `block in 
> > ask_many_with_completions'
> > /home/gaute/dev/ruby/sup.git/lib/sup/textfield.rb:75:in `call'
> > /home/gaute/dev/ruby/sup.git/lib/sup/textfield.rb:75:in `handle_input'
> > /home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:572:in `ask'
> > /home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:450:in 
> > `ask_many_with_completions'
> > /home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:519:in `ask_for_labels'
> > /home/gaute/dev/ruby/sup.git/lib/sup/util.rb:546:in `method_missing'
> > /home/gaute/dev/ruby/sup.git/lib/sup/modes/thread-index-mode.rb:536:in 
> > `edit_labels'
> > /home/gaute/dev/ruby/sup.git/lib/sup/mode.rb:52:in `handle_input'
> > /home/gaute/dev/ruby/sup.git/lib/sup/buffer.rb:266:in `handle_input'
> > bin/sup:244:in `<module:Redwood>'
> > bin/sup:67:in `<main>'
> > 
> > ----------
> > messages: 97
> > nosy: gauteh
> > priority: bug
> > ruby_version: 1.9.1
> > status: unread
> > sup_version: git
> > title: label tab completion with utf-8 chars fail
> > 
> --- Encoding::CompatibilityError from thread: main
> incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string)
> /home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/buffer.rb:476:in `block (2 levels) in ask_many_emails_with_completions'
> /home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/buffer.rb:476:in `select'
> /home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/buffer.rb:476:in `block in ask_many_emails_with_completions'
> /home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/textfield.rb:74:in `call'
> /home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/textfield.rb:74:in `handle_input'
> /home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/buffer.rb:578:in `ask'
> /home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/buffer.rb:472:in `ask_many_emails_with_completions'
> /home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/util.rb:547:in `method_missing'
> /home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/buffer.rb:548:in `ask_for_contacts'
> /home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/util.rb:547:in `method_missing'
> /home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/modes/compose-mode.rb:24:in `spawn_nicely'
> /home/gaute/.gem/ruby/1.9.1/gems/sup-999/bin/sup:331:in `<module:Redwood>'
> /home/gaute/.gem/ruby/1.9.1/gems/sup-999/bin/sup:78:in `<top (required)>'
> /home/gaute/.gem/ruby/1.9.1/bin/sup:19:in `load'
> /home/gaute/.gem/ruby/1.9.1/bin/sup:19:in `<main>'

[-- Attachment #1.2: exception-log.txt --]
[-- Type: text/plain, Size: 1439 bytes --]

--- Encoding::CompatibilityError from thread: main
incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string)
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/modes/edit-message-mode.rb:205:in `match'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/modes/edit-message-mode.rb:205:in `match'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/modes/edit-message-mode.rb:205:in `mime_encode_address'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/modes/edit-message-mode.rb:376:in `block (2 levels) in build_message'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/modes/edit-message-mode.rb:376:in `map'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/modes/edit-message-mode.rb:376:in `block in build_message'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/modes/edit-message-mode.rb:369:in `each'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/modes/edit-message-mode.rb:369:in `build_message'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/modes/edit-message-mode.rb:322:in `send_message'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/mode.rb:51:in `handle_input'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/lib/sup/buffer.rb:272:in `handle_input'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/bin/sup:285:in `<module:Redwood>'
/home/gaute/.gem/ruby/1.9.1/gems/sup-999/bin/sup:78:in `<top (required)>'
/home/gaute/.gem/ruby/1.9.1/bin/sup:19:in `load'
/home/gaute/.gem/ruby/1.9.1/bin/sup:19:in `<main>'

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH] utf-8 script encoding
  2010-01-03 15:51 ` Gaute Hope
  2010-01-03 15:56   ` Gaute Hope
@ 2010-01-03 16:07   ` Rich Lane
  2010-01-03 16:18     ` Gaute Hope
  1 sibling, 1 reply; 11+ messages in thread
From: Rich Lane @ 2010-01-03 16:07 UTC (permalink / raw)
  To: sup-devel; +Cc: eg, Rich Lane

---
Does this patch help?

 bin/sup                                     |    1 +
 bin/sup-add                                 |    1 +
 bin/sup-config                              |    1 +
 bin/sup-dump                                |    1 +
 bin/sup-recover-sources                     |    1 +
 bin/sup-sync                                |    1 +
 bin/sup-sync-back                           |    1 +
 bin/sup-tweak-labels                        |    1 +
 lib/sup.rb                                  |    1 +
 lib/sup/account.rb                          |    1 +
 lib/sup/buffer.rb                           |    1 +
 lib/sup/colormap.rb                         |    1 +
 lib/sup/contact.rb                          |    1 +
 lib/sup/crypto.rb                           |    1 +
 lib/sup/draft.rb                            |    1 +
 lib/sup/ferret_index.rb                     |    1 +
 lib/sup/hook.rb                             |    1 +
 lib/sup/horizontal-selector.rb              |    1 +
 lib/sup/imap.rb                             |    1 +
 lib/sup/index.rb                            |    1 +
 lib/sup/interactive-lock.rb                 |    1 +
 lib/sup/keymap.rb                           |    1 +
 lib/sup/label.rb                            |    1 +
 lib/sup/logger.rb                           |    1 +
 lib/sup/maildir.rb                          |    1 +
 lib/sup/mbox.rb                             |    1 +
 lib/sup/mbox/loader.rb                      |    1 +
 lib/sup/mbox/ssh-file.rb                    |    1 +
 lib/sup/mbox/ssh-loader.rb                  |    1 +
 lib/sup/message-chunks.rb                   |    1 +
 lib/sup/message.rb                          |    1 +
 lib/sup/mode.rb                             |    1 +
 lib/sup/modes/buffer-list-mode.rb           |    1 +
 lib/sup/modes/completion-mode.rb            |    1 +
 lib/sup/modes/compose-mode.rb               |    1 +
 lib/sup/modes/console-mode.rb               |    1 +
 lib/sup/modes/contact-list-mode.rb          |    1 +
 lib/sup/modes/edit-message-mode.rb          |    1 +
 lib/sup/modes/file-browser-mode.rb          |    1 +
 lib/sup/modes/forward-mode.rb               |    1 +
 lib/sup/modes/help-mode.rb                  |    1 +
 lib/sup/modes/inbox-mode.rb                 |    1 +
 lib/sup/modes/label-list-mode.rb            |    1 +
 lib/sup/modes/label-search-results-mode.rb  |    1 +
 lib/sup/modes/line-cursor-mode.rb           |    1 +
 lib/sup/modes/log-mode.rb                   |    1 +
 lib/sup/modes/person-search-results-mode.rb |    1 +
 lib/sup/modes/poll-mode.rb                  |    1 +
 lib/sup/modes/reply-mode.rb                 |    1 +
 lib/sup/modes/resume-mode.rb                |    1 +
 lib/sup/modes/scroll-mode.rb                |    1 +
 lib/sup/modes/search-results-mode.rb        |    1 +
 lib/sup/modes/text-mode.rb                  |    1 +
 lib/sup/modes/thread-index-mode.rb          |    1 +
 lib/sup/modes/thread-view-mode.rb           |    1 +
 lib/sup/person.rb                           |    1 +
 lib/sup/poll.rb                             |    1 +
 lib/sup/rfc2047.rb                          |    1 +
 lib/sup/sent.rb                             |    1 +
 lib/sup/source.rb                           |    1 +
 lib/sup/tagger.rb                           |    1 +
 lib/sup/textfield.rb                        |    1 +
 lib/sup/thread.rb                           |    1 +
 lib/sup/undo.rb                             |    1 +
 lib/sup/update.rb                           |    1 +
 lib/sup/util.rb                             |    1 +
 lib/sup/xapian_index.rb                     |    1 +
 67 files changed, 67 insertions(+), 0 deletions(-)

diff --git a/bin/sup b/bin/sup
index 493f48f..f05acc3 100755
--- a/bin/sup
+++ b/bin/sup
@@ -1,4 +1,5 @@
 #!/usr/bin/env ruby
+# encoding: utf-8
 
 require 'rubygems'
 
diff --git a/bin/sup-add b/bin/sup-add
index c53378d..de4f65f 100755
--- a/bin/sup-add
+++ b/bin/sup-add
@@ -1,4 +1,5 @@
 #!/usr/bin/env ruby
+# encoding: utf-8
 
 require 'uri'
 require 'rubygems'
diff --git a/bin/sup-config b/bin/sup-config
index b37e0b2..da8777b 100755
--- a/bin/sup-config
+++ b/bin/sup-config
@@ -1,4 +1,5 @@
 #!/usr/bin/env ruby
+# encoding: utf-8
 
 require 'rubygems'
 require 'highline/import'
diff --git a/bin/sup-dump b/bin/sup-dump
index 7b33be5..78e388a 100755
--- a/bin/sup-dump
+++ b/bin/sup-dump
@@ -1,4 +1,5 @@
 #!/usr/bin/env ruby
+# encoding: utf-8
 
 require 'rubygems'
 require 'trollop'
diff --git a/bin/sup-recover-sources b/bin/sup-recover-sources
index 43fa5f6..d4a9170 100755
--- a/bin/sup-recover-sources
+++ b/bin/sup-recover-sources
@@ -1,4 +1,5 @@
 #!/usr/bin/env ruby
+# encoding: utf-8
 
 require 'optparse'
 
diff --git a/bin/sup-sync b/bin/sup-sync
index 5e89dac..184d740 100755
--- a/bin/sup-sync
+++ b/bin/sup-sync
@@ -1,4 +1,5 @@
 #!/usr/bin/env ruby
+# encoding: utf-8
 
 require 'uri'
 require 'rubygems'
diff --git a/bin/sup-sync-back b/bin/sup-sync-back
index 6298c97..ffc863f 100755
--- a/bin/sup-sync-back
+++ b/bin/sup-sync-back
@@ -1,4 +1,5 @@
 #!/usr/bin/env ruby
+# encoding: utf-8
 
 require 'rubygems'
 require 'uri'
diff --git a/bin/sup-tweak-labels b/bin/sup-tweak-labels
index 9bb97b2..3b7bcc4 100755
--- a/bin/sup-tweak-labels
+++ b/bin/sup-tweak-labels
@@ -1,4 +1,5 @@
 #!/usr/bin/env ruby
+# encoding: utf-8
 
 require 'rubygems'
 require 'trollop'
diff --git a/lib/sup.rb b/lib/sup.rb
index 144f5e3..e158249 100644
--- a/lib/sup.rb
+++ b/lib/sup.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'rubygems'
 require 'yaml'
 require 'zlib'
diff --git a/lib/sup/account.rb b/lib/sup/account.rb
index bf8a8a0..fc655b9 100644
--- a/lib/sup/account.rb
+++ b/lib/sup/account.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class Account < Person
diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb
index 06923bd..cb045fc 100644
--- a/lib/sup/buffer.rb
+++ b/lib/sup/buffer.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'etc'
 require 'thread'
 
diff --git a/lib/sup/colormap.rb b/lib/sup/colormap.rb
index c4a4024..acaf996 100644
--- a/lib/sup/colormap.rb
+++ b/lib/sup/colormap.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Curses
   COLOR_DEFAULT = -1
 end
diff --git a/lib/sup/contact.rb b/lib/sup/contact.rb
index c489aaf..25bf84a 100644
--- a/lib/sup/contact.rb
+++ b/lib/sup/contact.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class ContactManager
diff --git a/lib/sup/crypto.rb b/lib/sup/crypto.rb
index fb2661a..072a30c 100644
--- a/lib/sup/crypto.rb
+++ b/lib/sup/crypto.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class CryptoManager
diff --git a/lib/sup/draft.rb b/lib/sup/draft.rb
index 5ea2935..740ec6b 100644
--- a/lib/sup/draft.rb
+++ b/lib/sup/draft.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class DraftManager
diff --git a/lib/sup/ferret_index.rb b/lib/sup/ferret_index.rb
index 4a2cc76..05bc5b2 100644
--- a/lib/sup/ferret_index.rb
+++ b/lib/sup/ferret_index.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'ferret'
 
 module Redwood
diff --git a/lib/sup/hook.rb b/lib/sup/hook.rb
index 3bf9823..b42b223 100644
--- a/lib/sup/hook.rb
+++ b/lib/sup/hook.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class HookManager
diff --git a/lib/sup/horizontal-selector.rb b/lib/sup/horizontal-selector.rb
index aef16d4..608703f 100644
--- a/lib/sup/horizontal-selector.rb
+++ b/lib/sup/horizontal-selector.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class HorizontalSelector
diff --git a/lib/sup/imap.rb b/lib/sup/imap.rb
index bdb9e15..5160e5c 100644
--- a/lib/sup/imap.rb
+++ b/lib/sup/imap.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'uri'
 require 'net/imap'
 require 'stringio'
diff --git a/lib/sup/index.rb b/lib/sup/index.rb
index 87d8d52..829e6a5 100644
--- a/lib/sup/index.rb
+++ b/lib/sup/index.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 ## Index interface, subclassed by Ferret indexer.
 
 require 'fileutils'
diff --git a/lib/sup/interactive-lock.rb b/lib/sup/interactive-lock.rb
index 92a5ead..5150c89 100644
--- a/lib/sup/interactive-lock.rb
+++ b/lib/sup/interactive-lock.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'fileutils'
 
 module Redwood
diff --git a/lib/sup/keymap.rb b/lib/sup/keymap.rb
index cb039e4..74e1599 100644
--- a/lib/sup/keymap.rb
+++ b/lib/sup/keymap.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class Keymap
diff --git a/lib/sup/label.rb b/lib/sup/label.rb
index 67474c2..f035dd8 100644
--- a/lib/sup/label.rb
+++ b/lib/sup/label.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class LabelManager
diff --git a/lib/sup/logger.rb b/lib/sup/logger.rb
index ccaeae0..7912ce2 100644
--- a/lib/sup/logger.rb
+++ b/lib/sup/logger.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require "sup"
 require 'stringio'
 require 'thread'
diff --git a/lib/sup/maildir.rb b/lib/sup/maildir.rb
index c2bd27a..b3935d3 100644
--- a/lib/sup/maildir.rb
+++ b/lib/sup/maildir.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'rmail'
 require 'uri'
 
diff --git a/lib/sup/mbox.rb b/lib/sup/mbox.rb
index 7af40dd..8973f06 100644
--- a/lib/sup/mbox.rb
+++ b/lib/sup/mbox.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require "sup/mbox/loader"
 require "sup/mbox/ssh-file"
 require "sup/mbox/ssh-loader"
diff --git a/lib/sup/mbox/loader.rb b/lib/sup/mbox/loader.rb
index 54d227d..031a744 100644
--- a/lib/sup/mbox/loader.rb
+++ b/lib/sup/mbox/loader.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'rmail'
 require 'uri'
 require 'set'
diff --git a/lib/sup/mbox/ssh-file.rb b/lib/sup/mbox/ssh-file.rb
index 4ae4bba..6f1c5ee 100644
--- a/lib/sup/mbox/ssh-file.rb
+++ b/lib/sup/mbox/ssh-file.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'net/ssh'
 
 module Redwood
diff --git a/lib/sup/mbox/ssh-loader.rb b/lib/sup/mbox/ssh-loader.rb
index e422a48..75875d5 100644
--- a/lib/sup/mbox/ssh-loader.rb
+++ b/lib/sup/mbox/ssh-loader.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'net/ssh'
 
 module Redwood
diff --git a/lib/sup/message-chunks.rb b/lib/sup/message-chunks.rb
index 581b707..8f0be32 100644
--- a/lib/sup/message-chunks.rb
+++ b/lib/sup/message-chunks.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'tempfile'
 
 ## Here we define all the "chunks" that a message is parsed
diff --git a/lib/sup/message.rb b/lib/sup/message.rb
index f3ac874..03fd831 100644
--- a/lib/sup/message.rb
+++ b/lib/sup/message.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'time'
 
 module Redwood
diff --git a/lib/sup/mode.rb b/lib/sup/mode.rb
index c8ad0cc..899a9fb 100644
--- a/lib/sup/mode.rb
+++ b/lib/sup/mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'open3'
 module Redwood
 
diff --git a/lib/sup/modes/buffer-list-mode.rb b/lib/sup/modes/buffer-list-mode.rb
index 1554cae..175b37a 100644
--- a/lib/sup/modes/buffer-list-mode.rb
+++ b/lib/sup/modes/buffer-list-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class BufferListMode < LineCursorMode
diff --git a/lib/sup/modes/completion-mode.rb b/lib/sup/modes/completion-mode.rb
index 3cb2fad..62aeab0 100644
--- a/lib/sup/modes/completion-mode.rb
+++ b/lib/sup/modes/completion-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class CompletionMode < ScrollMode
diff --git a/lib/sup/modes/compose-mode.rb b/lib/sup/modes/compose-mode.rb
index f0d1e23..90f6f18 100644
--- a/lib/sup/modes/compose-mode.rb
+++ b/lib/sup/modes/compose-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class ComposeMode < EditMessageMode
diff --git a/lib/sup/modes/console-mode.rb b/lib/sup/modes/console-mode.rb
index f0c626e..c4e51fe 100644
--- a/lib/sup/modes/console-mode.rb
+++ b/lib/sup/modes/console-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'pp'
 
 module Redwood
diff --git a/lib/sup/modes/contact-list-mode.rb b/lib/sup/modes/contact-list-mode.rb
index 49804ad..63d1e2f 100644
--- a/lib/sup/modes/contact-list-mode.rb
+++ b/lib/sup/modes/contact-list-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 module CanAliasContacts
diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb
index 8849271..618b3ef 100644
--- a/lib/sup/modes/edit-message-mode.rb
+++ b/lib/sup/modes/edit-message-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'tempfile'
 require 'socket' # just for gethostname!
 require 'pathname'
diff --git a/lib/sup/modes/file-browser-mode.rb b/lib/sup/modes/file-browser-mode.rb
index b92468d..976a8e8 100644
--- a/lib/sup/modes/file-browser-mode.rb
+++ b/lib/sup/modes/file-browser-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'pathname'
 
 module Redwood
diff --git a/lib/sup/modes/forward-mode.rb b/lib/sup/modes/forward-mode.rb
index 9428b4b..f5903f3 100644
--- a/lib/sup/modes/forward-mode.rb
+++ b/lib/sup/modes/forward-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class ForwardMode < EditMessageMode
diff --git a/lib/sup/modes/help-mode.rb b/lib/sup/modes/help-mode.rb
index b98f131..6e3274e 100644
--- a/lib/sup/modes/help-mode.rb
+++ b/lib/sup/modes/help-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class HelpMode < TextMode
diff --git a/lib/sup/modes/inbox-mode.rb b/lib/sup/modes/inbox-mode.rb
index 6c2244a..177c098 100644
--- a/lib/sup/modes/inbox-mode.rb
+++ b/lib/sup/modes/inbox-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'sup'
 
 module Redwood
diff --git a/lib/sup/modes/label-list-mode.rb b/lib/sup/modes/label-list-mode.rb
index f0084a9..50a4744 100644
--- a/lib/sup/modes/label-list-mode.rb
+++ b/lib/sup/modes/label-list-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class LabelListMode < LineCursorMode
diff --git a/lib/sup/modes/label-search-results-mode.rb b/lib/sup/modes/label-search-results-mode.rb
index bca51d4..d45b764 100644
--- a/lib/sup/modes/label-search-results-mode.rb
+++ b/lib/sup/modes/label-search-results-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class LabelSearchResultsMode < ThreadIndexMode
diff --git a/lib/sup/modes/line-cursor-mode.rb b/lib/sup/modes/line-cursor-mode.rb
index 1bd4ed1..0108592 100644
--- a/lib/sup/modes/line-cursor-mode.rb
+++ b/lib/sup/modes/line-cursor-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 ## extends ScrollMode to have a line-based cursor.
diff --git a/lib/sup/modes/log-mode.rb b/lib/sup/modes/log-mode.rb
index de320ce..0489a32 100644
--- a/lib/sup/modes/log-mode.rb
+++ b/lib/sup/modes/log-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'stringio'
 module Redwood
 
diff --git a/lib/sup/modes/person-search-results-mode.rb b/lib/sup/modes/person-search-results-mode.rb
index fc09126..656f394 100644
--- a/lib/sup/modes/person-search-results-mode.rb
+++ b/lib/sup/modes/person-search-results-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class PersonSearchResultsMode < ThreadIndexMode
diff --git a/lib/sup/modes/poll-mode.rb b/lib/sup/modes/poll-mode.rb
index cf61343..2cb8d47 100644
--- a/lib/sup/modes/poll-mode.rb
+++ b/lib/sup/modes/poll-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class PollMode < LogMode
diff --git a/lib/sup/modes/reply-mode.rb b/lib/sup/modes/reply-mode.rb
index 3d39a8a..b4f8bde 100644
--- a/lib/sup/modes/reply-mode.rb
+++ b/lib/sup/modes/reply-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class ReplyMode < EditMessageMode
diff --git a/lib/sup/modes/resume-mode.rb b/lib/sup/modes/resume-mode.rb
index e527542..4e4346f 100644
--- a/lib/sup/modes/resume-mode.rb
+++ b/lib/sup/modes/resume-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class ResumeMode < EditMessageMode
diff --git a/lib/sup/modes/scroll-mode.rb b/lib/sup/modes/scroll-mode.rb
index c131425..7b1aefd 100644
--- a/lib/sup/modes/scroll-mode.rb
+++ b/lib/sup/modes/scroll-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class ScrollMode < Mode
diff --git a/lib/sup/modes/search-results-mode.rb b/lib/sup/modes/search-results-mode.rb
index 121e817..59e83af 100644
--- a/lib/sup/modes/search-results-mode.rb
+++ b/lib/sup/modes/search-results-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class SearchResultsMode < ThreadIndexMode
diff --git a/lib/sup/modes/text-mode.rb b/lib/sup/modes/text-mode.rb
index 7c9e7d8..251b994 100644
--- a/lib/sup/modes/text-mode.rb
+++ b/lib/sup/modes/text-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class TextMode < ScrollMode
diff --git a/lib/sup/modes/thread-index-mode.rb b/lib/sup/modes/thread-index-mode.rb
index ccda50b..617cf67 100644
--- a/lib/sup/modes/thread-index-mode.rb
+++ b/lib/sup/modes/thread-index-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'set'
 
 module Redwood
diff --git a/lib/sup/modes/thread-view-mode.rb b/lib/sup/modes/thread-view-mode.rb
index 8b5642e..ca6108f 100644
--- a/lib/sup/modes/thread-view-mode.rb
+++ b/lib/sup/modes/thread-view-mode.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class ThreadViewMode < LineCursorMode
diff --git a/lib/sup/person.rb b/lib/sup/person.rb
index 4b1c80b..5256cc4 100644
--- a/lib/sup/person.rb
+++ b/lib/sup/person.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class Person
diff --git a/lib/sup/poll.rb b/lib/sup/poll.rb
index 4f30505..ac60373 100644
--- a/lib/sup/poll.rb
+++ b/lib/sup/poll.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'thread'
 
 module Redwood
diff --git a/lib/sup/rfc2047.rb b/lib/sup/rfc2047.rb
index f31faa1..8fe645d 100644
--- a/lib/sup/rfc2047.rb
+++ b/lib/sup/rfc2047.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 ## from: http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/101949
 
 # $Id: rfc2047.rb,v 1.4 2003/04/18 20:55:56 sam Exp $
diff --git a/lib/sup/sent.rb b/lib/sup/sent.rb
index 87ca6c6..8c48259 100644
--- a/lib/sup/sent.rb
+++ b/lib/sup/sent.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class SentManager
diff --git a/lib/sup/source.rb b/lib/sup/source.rb
index 6fe7bfb..134cda9 100644
--- a/lib/sup/source.rb
+++ b/lib/sup/source.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require "sup/rfc2047"
 
 module Redwood
diff --git a/lib/sup/tagger.rb b/lib/sup/tagger.rb
index d62f340..0a04b0c 100644
--- a/lib/sup/tagger.rb
+++ b/lib/sup/tagger.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 class Tagger
diff --git a/lib/sup/textfield.rb b/lib/sup/textfield.rb
index 9afeb34..8072f83 100644
--- a/lib/sup/textfield.rb
+++ b/lib/sup/textfield.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 ## a fully-functional text field supporting completions, expansions,
diff --git a/lib/sup/thread.rb b/lib/sup/thread.rb
index 2300305..17d709d 100644
--- a/lib/sup/thread.rb
+++ b/lib/sup/thread.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 ## Herein lies all the code responsible for threading messages. It's
 ## basically an online version of the JWZ threading algorithm:
 ## http://www.jwz.org/doc/threading.html
diff --git a/lib/sup/undo.rb b/lib/sup/undo.rb
index 9ccf84a..2ca7d02 100644
--- a/lib/sup/undo.rb
+++ b/lib/sup/undo.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 ## Implements a single undo list for the Sup instance
diff --git a/lib/sup/update.rb b/lib/sup/update.rb
index d386801..b689b51 100644
--- a/lib/sup/update.rb
+++ b/lib/sup/update.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 module Redwood
 
 ## Classic listener/broadcaster paradigm. Handles communication between various
diff --git a/lib/sup/util.rb b/lib/sup/util.rb
index 25af762..5bd93b3 100644
--- a/lib/sup/util.rb
+++ b/lib/sup/util.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'thread'
 require 'lockfile'
 require 'mime/types'
diff --git a/lib/sup/xapian_index.rb b/lib/sup/xapian_index.rb
index 955ec8f..2919ce6 100644
--- a/lib/sup/xapian_index.rb
+++ b/lib/sup/xapian_index.rb
@@ -1,3 +1,4 @@
+# encoding: utf-8
 require 'xapian'
 require 'set'
 
-- 
1.6.3.3



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] utf-8 script encoding
  2010-01-03 16:07   ` [PATCH] utf-8 script encoding Rich Lane
@ 2010-01-03 16:18     ` Gaute Hope
  2010-01-23 12:44       ` [sup-devel] " William Morgan
  0 siblings, 1 reply; 11+ messages in thread
From: Gaute Hope @ 2010-01-03 16:18 UTC (permalink / raw)
  To: Rich Lane; +Cc: sup-devel

[-- Attachment #1: Type: text/plain, Size: 291 bytes --]

Excerpts from Rich Lane's message of 2010-01-03 17:07:16 +0100:
> --- Does this patch help?
  
No. Tab completion fails, and sending fails, I can add names with UTF-8
chars to the recipient list, but it fails with the last attached
exception. This is the same behaviour as earlier.

- gaute

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [sup-devel] [issue36] label tab completion with utf-8 chars fail
  2010-01-03 15:56   ` Gaute Hope
@ 2010-01-15 10:23     ` Gaute Hope
  0 siblings, 0 replies; 11+ messages in thread
From: Gaute Hope @ 2010-01-15 10:23 UTC (permalink / raw)
  To: sup-devel

Excerpts from Gaute Hope's message of 2010-01-03 16:56:17 +0100:
> Apparently I can't even send messages when I enter the UTF-8 email address
> manually. 

This also goes for subjects containing UTF-8 chars, i can add them, or
reply to one containing it - but sup fails when trying to send.

- gaute


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [sup-devel] [PATCH] utf-8 script encoding
  2010-01-03 16:18     ` Gaute Hope
@ 2010-01-23 12:44       ` William Morgan
  2010-02-13 13:51         ` Michael Hamann
  0 siblings, 1 reply; 11+ messages in thread
From: William Morgan @ 2010-01-23 12:44 UTC (permalink / raw)
  To: sup-devel

Reformatted excerpts from Gaute Hope's message of 2010-01-03:
> No. Tab completion fails, and sending fails, I can add names with
> UTF-8 chars to the recipient list, but it fails with the last attached
> exception. This is the same behaviour as earlier.

That's weird, I would've expected this to help. What's the alternative,
adding "u" to the end of every regexp?
-- 
William <wmorgan-sup@masanjin.net>
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [sup-devel] [PATCH] utf-8 script encoding
  2010-01-23 12:44       ` [sup-devel] " William Morgan
@ 2010-02-13 13:51         ` Michael Hamann
  2010-09-09 12:02           ` Gaute Hope
  0 siblings, 1 reply; 11+ messages in thread
From: Michael Hamann @ 2010-02-13 13:51 UTC (permalink / raw)
  To: sup-devel

Hi,

Excerpts from William Morgan's message of 2010-01-23 13:44:39 +0100:
> Reformatted excerpts from Gaute Hope's message of 2010-01-03:
> > No. Tab completion fails, and sending fails, I can add names with
> > UTF-8 chars to the recipient list, but it fails with the last attached
> > exception. This is the same behaviour as earlier.
> 
> That's weird, I would've expected this to help. What's the alternative,
> adding "u" to the end of every regexp?

Has there been any progress on this subject? This is imho a quite annoying bug
as it makes me regularly recover mails from the buffer of screen when having
written a reply to a message with a subject containing utf-8 chars without
noticing that.

Sorry if this should have been fixed already, I'm currently using git next and
there the problem still exists.

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


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [sup-devel] [PATCH] utf-8 script encoding
  2010-02-13 13:51         ` Michael Hamann
@ 2010-09-09 12:02           ` Gaute Hope
  2010-09-17 10:54             ` Gaute Hope
  0 siblings, 1 reply; 11+ messages in thread
From: Gaute Hope @ 2010-09-09 12:02 UTC (permalink / raw)
  To: sup-devel

[-- Attachment #1: Type: text/plain, Size: 1182 bytes --]

Excerpts from Michael Hamann's message of 2010-02-13 14:51:53 +0100:
> Hi,
> 
> Excerpts from William Morgan's message of 2010-01-23 13:44:39 +0100:
> > Reformatted excerpts from Gaute Hope's message of 2010-01-03:
> > > No. Tab completion fails, and sending fails, I can add names with
> > > UTF-8 chars to the recipient list, but it fails with the last attached
> > > exception. This is the same behaviour as earlier.
> > 
> > That's weird, I would've expected this to help. What's the alternative,
> > adding "u" to the end of every regexp?
> 
> Has there been any progress on this subject? This is imho a quite annoying bug
> as it makes me regularly recover mails from the buffer of screen when having
> written a reply to a message with a subject containing utf-8 chars without
> noticing that.
> 
> Sorry if this should have been fixed already, I'm currently using git next and
> there the problem still exists.
> 

I put target.force_encoding 'UTF-8' on the tab completion of contacts
and labels and that seems to have fixed the issue 36 on Ruby 1.9. See
attached patch; or:
http://gitorious.org/sup/gautehs-mainline/commit/c78e53f13b493afe2ce13c8f312068fe042cd126

- gaute

[-- Attachment #2: 0001-Force-UTF-8-on-label-and-contact-completion.patch --]
[-- Type: application/octet-stream, Size: 1448 bytes --]

From c78e53f13b493afe2ce13c8f312068fe042cd126 Mon Sep 17 00:00:00 2001
From: Gaute Hope <eg@gaute.vetsj.com>
Date: Thu, 9 Sep 2010 13:48:49 +0200
Subject: [PATCH] Force UTF-8 on label and contact completion

Fix issue 36, by forcing UTF-8 encoding on string that will be matched.

Only if the force_encoding method is available to maintain 1.8
compatability.

There is likely to still be a few other places where the equivilent of
this bug still exists.
---
 lib/sup/buffer.rb |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb
index 04bbdcf..233db3f 100644
--- a/lib/sup/buffer.rb
+++ b/lib/sup/buffer.rb
@@ -469,6 +469,7 @@ EOS
           raise "william screwed up completion: #{partial.inspect}"
         end
 
+      target.force_encoding 'UTF-8' if target.methods.include?(:encoding)
       completions.select { |x| x =~ /^#{Regexp::escape target}/i }.map { |x| [prefix + x, x] }
     end
   end
@@ -477,6 +478,7 @@ EOS
     ask domain, question, default do |partial|
       prefix, target = partial.split_on_commas_with_remainder
       target ||= prefix.pop || ""
+      target.force_encoding 'UTF-8' if target.methods.include?(:encoding)
       prefix = prefix.join(", ") + (prefix.empty? ? "" : ", ")
       completions.select { |x| x =~ /^#{Regexp::escape target}/i }.sort_by { |c| [ContactManager.contact_for(c) ? 0 : 1, c] }.map { |x| [prefix + x, x] }
     end
-- 
1.7.2.3


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [sup-devel] [PATCH] utf-8 script encoding
  2010-09-09 12:02           ` Gaute Hope
@ 2010-09-17 10:54             ` Gaute Hope
  2010-10-04  8:40               ` Gaute Hope
  0 siblings, 1 reply; 11+ messages in thread
From: Gaute Hope @ 2010-09-17 10:54 UTC (permalink / raw)
  To: sup-devel

[-- Attachment #1: Type: text/plain, Size: 609 bytes --]

Excerpts from Gaute Hope's message of 2010-09-09 14:02:17 +0200:
> I put target.force_encoding 'UTF-8' on the tab completion of contacts
> and labels and that seems to have fixed the issue 36 on Ruby 1.9. See
> attached patch; or:
> http://gitorious.org/sup/gautehs-mainline/commit/c78e53f13b493afe2ce13c8f312068fe042cd126

Also force encoding on label search completion: 
http://gitorious.org/~gauteh/sup/gautehs-mainline/commit/009cda0e379950726c5234a8949e636194bf13e3

There's still an error if you try to complete multiple unicode
recipients, probably because one of the strings are not Unicode.

- gaute

[-- Attachment #2: 0001-Also-force-encoding-on-label-search-completion.patch --]
[-- Type: application/octet-stream, Size: 739 bytes --]

From 009cda0e379950726c5234a8949e636194bf13e3 Mon Sep 17 00:00:00 2001
From: Gaute Hope <eg@gaute.vetsj.com>
Date: Fri, 17 Sep 2010 12:46:18 +0200
Subject: [PATCH] Also force encoding on label search completion

---
 lib/sup/buffer.rb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb
index 233db3f..9b2bbcb 100644
--- a/lib/sup/buffer.rb
+++ b/lib/sup/buffer.rb
@@ -453,6 +453,7 @@ EOS
 
   def ask_with_completions domain, question, completions, default=nil
     ask domain, question, default do |s|
+      s.force_encoding 'UTF-8' if s.methods.include?(:encoding)
       completions.select { |x| x =~ /^#{Regexp::escape s}/i }.map { |x| [x, x] }
     end
   end
-- 
1.7.2.3


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [sup-devel] [PATCH] utf-8 script encoding
  2010-09-17 10:54             ` Gaute Hope
@ 2010-10-04  8:40               ` Gaute Hope
  0 siblings, 0 replies; 11+ messages in thread
From: Gaute Hope @ 2010-10-04  8:40 UTC (permalink / raw)
  To: sup-devel

[-- Attachment #1: Type: text/plain, Size: 902 bytes --]

And force encoding on already applied labels:
http://gitorious.org/sup/gautehs-mainline/commit/adc49a0a31b986701ef4c888de44d7ada65b0f4e

I'd squash those, but there might be more coming up ;)

- gaute

Excerpts from Gaute Hope's message of 2010-09-17 12:54:00 +0200:
> Excerpts from Gaute Hope's message of 2010-09-09 14:02:17 +0200:
> > I put target.force_encoding 'UTF-8' on the tab completion of contacts
> > and labels and that seems to have fixed the issue 36 on Ruby 1.9. See
> > attached patch; or:
> > http://gitorious.org/sup/gautehs-mainline/commit/c78e53f13b493afe2ce13c8f312068fe042cd126
> 
> Also force encoding on label search completion: 
> http://gitorious.org/~gauteh/sup/gautehs-mainline/commit/009cda0e379950726c5234a8949e636194bf13e3
> 
> There's still an error if you try to complete multiple unicode
> recipients, probably because one of the strings are not Unicode.
> 
> - gaute

[-- Attachment #2: 0001-UTF-8-label-completion-Convert-existing-labels.patch --]
[-- Type: application/octet-stream, Size: 798 bytes --]

From adc49a0a31b986701ef4c888de44d7ada65b0f4e Mon Sep 17 00:00:00 2001
From: Gaute Hope <eg@gaute.vetsj.com>
Date: Mon, 4 Oct 2010 10:33:15 +0200
Subject: [PATCH] UTF-8 label completion: Convert existing labels

---
 lib/sup/buffer.rb |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/lib/sup/buffer.rb b/lib/sup/buffer.rb
index 9b2bbcb..f3cfb8a 100644
--- a/lib/sup/buffer.rb
+++ b/lib/sup/buffer.rb
@@ -470,6 +470,7 @@ EOS
           raise "william screwed up completion: #{partial.inspect}"
         end
 
+      prefix.force_encoding 'UTF-8' if prefix.methods.include?(:encoding)
       target.force_encoding 'UTF-8' if target.methods.include?(:encoding)
       completions.select { |x| x =~ /^#{Regexp::escape target}/i }.map { |x| [prefix + x, x] }
     end
-- 
1.7.3


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-10-04  8:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-25 14:02 [sup-devel] [issue36] label tab completion with utf-8 chars fail Gaute Hope
2010-01-03 15:51 ` Gaute Hope
2010-01-03 15:56   ` Gaute Hope
2010-01-15 10:23     ` Gaute Hope
2010-01-03 16:07   ` [PATCH] utf-8 script encoding Rich Lane
2010-01-03 16:18     ` Gaute Hope
2010-01-23 12:44       ` [sup-devel] " William Morgan
2010-02-13 13:51         ` Michael Hamann
2010-09-09 12:02           ` Gaute Hope
2010-09-17 10:54             ` Gaute Hope
2010-10-04  8:40               ` Gaute Hope

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox