From: Michael Stapelberg <michael+sup@stapelberg.de>
To: sup-devel <sup-devel@rubyforge.org>
Subject: [sup-devel] [PATCH] Bugfix: mime_encode: Encode _ as =5F instead of =96
Date: Tue, 26 Oct 2010 00:13:46 +0200 [thread overview]
Message-ID: <1288044796-sup-6774@midna.zekjur.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 447 bytes --]
Hi,
quote from the commit message:
This line of code was introduced in 0d45aa38, probably by mistake. The ASCII
code in decimal for '_' (underscore) is 95 (the code says 96, but probably
another mistake), but as mime encoding is hexadecimal, we need =5F instead.
An example of this encoding problem can be seen in one of my earlier patches
with message-id <1287565270-sup-1161@midna.zekjur.net>.
Best regards,
Michael
[-- Attachment #2: 0001-Bugfix-mime_encode-Encode-_-as-5F-instead-of-96.patch --]
[-- Type: application/octet-stream, Size: 1347 bytes --]
From f8c983851e4439dc1ce050e18a70bfcdcc5bd909 Mon Sep 17 00:00:00 2001
From: Michael Stapelberg <michael@stapelberg.de>
Date: Tue, 26 Oct 2010 00:09:02 +0200
Subject: [PATCH] Bugfix: mime_encode: Encode _ as =5F instead of =96
This line of code was introduced in 0d45aa38, probably by mistake. The ASCII
code in decimal for '_' (underscore) is 95 (the code says 96, but probably
another mistake), but as mime encoding is hexadecimal, we need =5F instead.
An example of this encoding problem can be seen in one of my earlier patches
with message-id <1287565270-sup-1161@midna.zekjur.net>.
---
lib/sup/modes/edit-message-mode.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb
index 86aef4b..28082c3 100644
--- a/lib/sup/modes/edit-message-mode.rb
+++ b/lib/sup/modes/edit-message-mode.rb
@@ -218,7 +218,7 @@ protected
def mime_encode string
string = [string].pack('M') # basic quoted-printable
string.gsub!(/=\n/,'') # .. remove trailing newline
- string.gsub!(/_/,'=96') # .. encode underscores
+ string.gsub!(/_/,'=5F') # .. encode underscores
string.gsub!(/\?/,'=3F') # .. encode question marks
string.gsub!(/ /,'_') # .. translate space to underscores
"=?utf-8?q?#{string}?="
--
1.7.1
[-- Attachment #3: Type: text/plain, Size: 143 bytes --]
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel
next reply other threads:[~2010-10-25 23:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-25 22:13 Michael Stapelberg [this message]
2010-11-04 16:04 ` Rich Lane
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=1288044796-sup-6774@midna.zekjur.net \
--to=michael+sup@stapelberg.de \
--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