* [sup-devel] [PATCH] Bugfix: mime_encode: Encode _ as =5F instead of =96
@ 2010-10-25 22:13 Michael Stapelberg
2010-11-04 16:04 ` Rich Lane
0 siblings, 1 reply; 2+ messages in thread
From: Michael Stapelberg @ 2010-10-25 22:13 UTC (permalink / raw)
To: sup-devel
[-- 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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [sup-devel] [PATCH] Bugfix: mime_encode: Encode _ as =5F instead of =96
2010-10-25 22:13 [sup-devel] [PATCH] Bugfix: mime_encode: Encode _ as =5F instead of =96 Michael Stapelberg
@ 2010-11-04 16:04 ` Rich Lane
0 siblings, 0 replies; 2+ messages in thread
From: Rich Lane @ 2010-11-04 16:04 UTC (permalink / raw)
To: Michael Stapelberg; +Cc: sup-devel
Applied to master.
_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-11-04 16:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-25 22:13 [sup-devel] [PATCH] Bugfix: mime_encode: Encode _ as =5F instead of =96 Michael Stapelberg
2010-11-04 16:04 ` Rich Lane
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox