Re: utf8 file corruption after transmission over email
- To: mutt-users@xxxxxxxx
- Subject: Re: utf8 file corruption after transmission over email
- From: Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx>
- Date: Fri, 8 May 2009 18:04:42 -0500
- Comment: DomainKeys? See http://domainkeys.sourceforge.net/
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed; d=memoryhole.net; h=date :from:to:subject:message-id:references:mime-version:content-type :in-reply-to; s=default; bh=xdsN2NoEz52sbRQK2zoeKUAH/Qg=; b=Paxw skTfe5lqjkh4cYkrV9uvrfnjcf67z6d9JZJerETsLreCfzSlQG+OFJQjCTkvFJ2A Bz9swLnuSg+YVcFJ4AgzgdfsaAhCQl3WjtruoSTRy46sNW7FsNS1PdaqA7NFp48G uuxSEGRvYHb9mNsnbSpegaZQJPJ5r4UaKmqFk8U=
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=mUkOGCb1kI1q6Ul8JD08J5A8x8+W8XsZoF+JPeExzytfZW58+VUl1Fg55DTp0rqK7X8gYwvORk88OGNHIquPY4QtUTNVFcqkE5AVETzNbzLVVlu04aDZyAp99gzBERy8ku97PStkYQ2f6qktXvQIy0julsP0zIjMzWF+6K+wstU=; h=Received:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:Content-Disposition:In-Reply-To:OpenPGP:User-Agent;
- In-reply-to: <20090508220001.GA29331@xxxxxxx>
- List-post: <mailto:mutt-users@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-users"
- Mail-followup-to: mutt-users@xxxxxxxx
- Openpgp: id=CA8E235E; url=http://www.memoryhole.net/~kyle/kyle-pgp.asc; preference=signencrypt
- References: <20090508220001.GA29331@xxxxxxx>
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.19 (2009-04-29)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On Friday, May 8 at 03:00 PM, quoth Aaron S.:
> I have a mystery that I'm trying to solve to no avail.
Hopefully we can help!
> I got a little sample XML (utf-8) encoded file that I'm trying to
> send as attachment. When I attach it, mutt correctly identifies it:
> [text/plain, 8bit, utf-8, 0.3K], since there are non-ASCII
> characters, in this case there is only 1 such character.
Well, actually, that's an incorrect identification. It's NOT a
text/plain file, it's an xml file. According to RFC 3023, it should
either be sent as application/xml or as text/xml.
Now, that misidentification shouldn't cause the problem you're having,
but correcting it *probably* will fix the problem. I bet that if you
add the following to your ~/.mime.types file, the problem goes away:
application/xml jff
> After I send it, this attached file becomes currupt.
I tried sending your file to myself, both with and without that line
in my mime.types file, and the file didn't get corrupted either way.
My guess is that this is ACTUALLY your mail server's fault (did you
send it through an MSFT Exchange server maybe? They're really bad
about this). Here's what I think happened: you have configured mutt to
send things in 8-bit mode (i.e. $allow_8bit). Thus, when sending a
utf-8 file attachment with an unusual character in it, mutt sent it
completely unmodified, because that's supposed to be safe to do when
sending in 8-bit mode. But some servers (and I've had this happen more
often than not with Exchange servers) attempt to convert all messages
into 7-bit form. Unfortunately, they're often very bad at it. I've had
several messages corrupted by Exchange servers simply because they
couldn't handle curly-quotes correctly. It's happened often enough
that I finally just unset allow_8bit so that mutt would always take
care of encoding my messages in a 7-bit safe manner, because mutt is
so much better at it than they are.
Anyway, does that help?
~Kyle
- --
Anyway, have fun.
And don't bother reporting any bugs for the next few days. I won't
care anyway.
-- Linus Torvalds, when kernel 2.4 came out
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!
iQIcBAEBCAAGBQJKBLqJAAoJECuveozR/AWeBBQP/j1tOe19BTFKo/AN4gzcDhTS
72ug8j7pY3M75W7DJ33Bx3p6gafGEwaiHh6mePt/0L4YuHzGpZxhog9FmmzptJmG
1ROfdmkJ4DYH7zrXTHvLBufrp1I/hlAGqsogncrs+N/gLV6QNzJno3FnY9xkVbxe
DNm3MgkksZ1U9uMXyhrHsoJ+NQ01zuzP6BtEp1uVQKOHnluEd8jzyR9Dow5j5/8A
zp84PLMCvHn5UIQl1cf8qoUGFSfznBmK6xMgBDXCy/bghjwliGdPsy8n3Y0VhD6V
16vqx3qcTwoSbbTaQcyqY++v82TvQAz8izat23C1OWxWnYoAiy5lEjMv5FBh5UkO
dyDZKAWM4XmM05c1GexEcmhfvAHOQ2Il93hluKA7ZIFGeDfyz4Hl+dkeY7aSX2ek
6caHXz+jQnRz6hgBnwk1GcoTDwdmAdtU8XZYCjYHo+1BotMyKzMcE7c/483pj4Kb
dOpluhcPXsjnHKJK3wvRzT9lQqfGy4XFU6SuxXIH8TIxucAvlw+ZWrwUdpx1btIm
tH1ESVyIr4RoAm8viVl/OUdZ2apF8an9faxMwa80YBVGog9TxfoCy0jYOxs0g9YW
KLhPmaeeHaBaFpeha//MN8zcMxNknx7WsFvg2eL7XyMoUj3s2LhlWE6eQu0Luijc
3NWylNKI3jMswtfFtUyQ
=Hbvl
-----END PGP SIGNATURE-----