Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
From: Gaute Hope <eg@gaute.vetsj.com>
To: sup-devel <sup-devel@rubyforge.org>
Subject: Re: [sup-devel] [PATCH] utf-8 script encoding
Date: Fri, 17 Sep 2010 12:54:00 +0200	[thread overview]
Message-ID: <1284720809-sup-6508@dolk> (raw)
In-Reply-To: <1284033605-sup-442@dolk>

[-- 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


  reply	other threads:[~2010-09-17 10:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2010-10-04  8:40               ` Gaute Hope

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=1284720809-sup-6508@dolk \
    --to=eg@gaute.vetsj.com \
    --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