unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [BUG] Saving attachments containing UTF-8 chars
@ 2012-10-29 13:30 Michael Stapelberg
  2012-10-29 16:31 ` Tomi Ollila
  2012-11-27  2:11 ` David Bremner
  0 siblings, 2 replies; 11+ messages in thread
From: Michael Stapelberg @ 2012-10-29 13:30 UTC (permalink / raw)
  To: notmuch

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

Hello,

attached you can find a message which seems to trigger a bug somewhere
in my notmuch setup. The message has been sent to me and includes a
patchfile, which, when saved using the "w" key in notmuch-emacs, cannot
be applied.

When using munpack(1) on the raw mail file (I’ve attached rawmail.gz
just to be sure that the message doesn’t get mangled in some way), the
unpacked attachment can be attached just fine.

When diff'ing both files, I see that munpack correctly stores the file,
including the problematic UTF-8 apostrophe:
00000200  67 3b 20 64 69 64 6e e2  80 99 74 20 72 65 61 64  |g; didn...t read|

However, the version of the file saved with notmuch contains:
00000200  67 3b 20 64 69 64 6e 19  74 20 72 65 61 64 22 20  |g; didn.t read" |

If there is anything I can do to help debugging this (or if there is a
known fix), please let me know.


[-- Attachment #2: Type: message/rfc822, Size: 9312 bytes --]

[-- Attachment #2.1.1.1: Type: text/plain, Size: 2071 bytes --]

On 2012-10-25 04:44, Michael Stapelberg wrote:
> Hi Conley,
>
> Conley Moorhous <conleymoorhous@gmail.com> writes:
>> Sorry, I accidentally used the master branch. I've attached the proper
>> patch, matched against the next branch!
> Im sorry to bother you again about this, but I still cannot apply the
> patch you sent me on the "next" branch:
>
> midna /tmp $ git clone -b next git://code.i3wm.org/i3
> Cloning into 'i3'...
> remote: Counting objects: 20314, done.
> remote: Compressing objects: 100% (4651/4651), done.
> remote: Total 20314 (delta 15312), reused 20314 (delta 15312)
> Receiving objects: 100% (20314/20314), 4.98 MiB | 418 KiB/s, done.
> Resolving deltas: 100% (15312/15312), done.
> midna /tmp $ cd i3    
> midna /tmp/i3 next $ git am /tmp/fix_alt.patch
> Applying: docs/userguide: s/alt/Alt/
> error: patch failed: docs/userguide:12
> error: docs/userguide: patch does not apply
> Patch failed at 0001 docs/userguide: s/alt/Alt/
> When you have resolved this problem run "git am --resolved".
> If you would prefer to skip this patch, instead run "git am --skip".
> To restore the original branch and stop patching run "git am --abort".
>
> I then tried to make the changes you did on my own and generate a patch
> file using git format-patch HEAD^ and it looks very much like yours,
> except that it doesnt have broken UTF-8 in the first context line.
>
> Im not too sure where the problem lies here (that is, whether its your
> system, git version, locale setup, mail client), but you might want to
> investigate and re-send the patch. If you cant figure it out, I can
> also do the changes for you and commit it, though it seems desirable to
> me to fix such issues once and for all.
>
Wow, turns out I'm dumb :( It was Thunderbird, which, for some reason,
does not default to UTF-8. It /might/ work now, but knowing me, I'll
have done something else wrong (I tried applying it locally and it
worked)! I'm putting you through all this work for three measly words, ha!

I'll make up for it eventually, I hope. I'll submit a big ol' helpful patch.

[-- Attachment #2.1.1.2: Type: text/html, Size: 2568 bytes --]

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2.1.2: fix_alt.patch --]
[-- Type: text/x-patch; name=fix_alt.patch, Size: 1282 bytes --]

From eda92a24e2460a36e2e59372120c92a8fac213b9 Mon Sep 17 00:00:00 2001
From: Conley Moorhous <conleymoorhous@gmail.com>
Date: Thu, 18 Oct 2012 22:12:11 -0500
Subject: [PATCH] docs/userguide: s/alt/Alt/

---
 docs/userguide | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/docs/userguide b/docs/userguide
index e76e4e0..2cdca05 100644
--- a/docs/userguide
+++ b/docs/userguide
@@ -12,9 +12,9 @@ contact us on IRC (preferred) or post your question(s) on the mailing list.
 For the "too long; didnt read" people, here is an overview of the default
 keybindings (click to see the full size image):
 
-*Keys to use with $mod (alt):*
+*Keys to use with $mod (Alt):*
 
-image:keyboard-layer1.png["Keys to use with $mod (alt)",width=600,link="keyboard-layer1.png"]
+image:keyboard-layer1.png["Keys to use with $mod (Alt)",width=600,link="keyboard-layer1.png"]
 
 *Keys to use with Shift+$mod:*
 
@@ -26,7 +26,7 @@ are your homerow.
 == Using i3
 
 Throughout this guide, the keyword +$mod+ will be used to refer to the
-configured modifier. This is the alt key (Mod1) by default, with windows (Mod4)
+configured modifier. This is the Alt key (Mod1) by default, with windows (Mod4)
 being a popular alternative.
 
 === Opening terminals and moving around
-- 
1.8.0


[-- Attachment #3: rawmail.gz --]
[-- Type: application/octet-stream, Size: 3762 bytes --]

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

end of thread, other threads:[~2012-11-30 13:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-29 13:30 [BUG] Saving attachments containing UTF-8 chars Michael Stapelberg
2012-10-29 16:31 ` Tomi Ollila
2012-11-18  5:29   ` Ethan Glasser-Camp
2012-11-18 18:02     ` Ethan Glasser-Camp
2012-11-27  2:11 ` David Bremner
2012-11-30  8:51   ` Michael Stapelberg
2012-11-30  9:34     ` Mark Walters
2012-11-30 11:14       ` Michael Stapelberg
2012-11-30 13:02         ` Mark Walters
2012-11-30 13:25           ` Michael Stapelberg
2012-11-30 13:12         ` Tomi Ollila

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).