From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/76989 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.gnus.general Subject: Re: bug#8070: gnus damages attached file Date: Sun, 20 Feb 2011 09:49:45 +0100 Message-ID: References: <871v34nwdn.fsf@myhost.localdomain> <87aahss3yu.fsf@gnus.org> <87hbbz6fg4.fsf@myhost.localdomain> <87vd0fpvzv.fsf@gnus.org> <874o7z662d.fsf@myhost.localdomain> <87d3mnk1sy.fsf@myhost.localdomain> <87ipwfo6as.fsf@gnus.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="==-=-=" X-Trace: dough.gmane.org 1298191850 1291 80.91.229.12 (20 Feb 2011 08:50:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 20 Feb 2011 08:50:50 +0000 (UTC) Cc: Hobbit , ding@gnus.org To: bugs@gnus.org Original-X-From: ding-owner+M25322@lists.math.uh.edu Sun Feb 20 09:50:46 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Pr509-0007Rb-JF for ding-account@gmane.org; Sun, 20 Feb 2011 09:50:45 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Pr4zL-0000J3-0W; Sun, 20 Feb 2011 02:49:55 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Pr4zJ-0000Im-4k for ding@lists.math.uh.edu; Sun, 20 Feb 2011 02:49:53 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1Pr4zD-0004kc-OP for ding@lists.math.uh.edu; Sun, 20 Feb 2011 02:49:51 -0600 Original-Received: from mail-out.m-online.net ([212.18.0.10]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1Pr4zB-0007Ps-Nu; Sun, 20 Feb 2011 09:49:45 +0100 Original-Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 390421824449; Sun, 20 Feb 2011 09:49:45 +0100 (CET) X-Auth-Info: q/0ldgmgstTAslBFNlupj19j9q1TK0W8/O7jGwTOc/I= Original-Received: from linux.local (ppp-88-217-109-210.dynamic.mnet-online.de [88.217.109.210]) by mail.mnet-online.de (Postfix) with ESMTPA id 29C4F1C00114; Sun, 20 Feb 2011 09:49:45 +0100 (CET) Original-Received: by linux.local (Postfix, from userid 501) id CE9B81E5308; Sun, 20 Feb 2011 09:49:45 +0100 (CET) X-Yow: .. I want a COLOR T.V. and a VIBRATING BED!!! In-Reply-To: <87ipwfo6as.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sat, 19 Feb 2011 17:15:07 -0800") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2.94 (gnu/linux) X-Spam-Score: 0.4 (/) X-Spam-Report: SpamAssassin (3.3.1 2010-03-16) analysis follows Bayesian score: 0.0000 Ham tokens: 0.000-1503--4647h-0s--0d--H*UA:Emacs, 0.000-1391--4300h-0s--0d--H*u:Emacs, 0.000-1339--4139h-0s--0d--H*UA:Gnus, 0.000-1339--4138h-0s--0d--H*u:Gnus, 0.000-1291--3990h-0s--0d--H*u:linux Spam tokens: 0.998-310--3h-3053s--0d--HTo:U*bugs, 0.987-1--0h-1s--1d--hobbit, 0.987-1--0h-1s--1d--D*yandex.ru, 0.987-1--0h-1s--1d--Hobbit, 0.987-1--0h-1s--1d--H*Ad:D*yandex.ru Autolearn status: no -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, low trust [212.18.0.10 listed in list.dnswl.org] 2.3 FSL_RU_URL URI: FSL_RU_URL -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 T_TVD_MIME_NO_HEADERS BODY: T_TVD_MIME_NO_HEADERS List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:76989 Archived-At: --==-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Lars Ingebrigtsen writes: > Hobbit writes: > >> If you look at mml-generate-mime-1 at mml.el.gz, you'll see this code: >> >> (if (and (not raw) >> (member (car (split-string type "/")) '("text" "message"))) >> (progn >> >> When attachment is text file all this black magic after `progn' starts >> to work. Question arises: why not just grab a text, encode it into >> base64 and put into a message? You'll still have to find out the correct charset. > It's a good question, and I don't know. I've Cc'd this message to the > Gnus development list -- perhaps someone there knows? > > (The issue is that the user inserts the following MIME part: > > =C3=B0=C3=B3=C3=B1=C3=B1=C3=AA=C3=A8=C3=A9 =C3=B2=C3=A5=C3=AA=C3=B1=C3=B2= =C3=A2 =C3=AA=C3=AF1251 > > > and then the CP text gets marked as utf-8.) I see this in the raw mail: --=3D-=3D-=3D Content-Type: text/plain; charset=3Diso-8859-1 Content-Disposition: inline; filename=3Dthing.txt Content-Transfer-Encoding: base64 8PPx8ero6SDy5erx8iDiIOrvMTI1MQ0K --=3D-=3D-=3D Which makes sense, since 8-bit encodings cannot be told apart, so the detection can't do better than using the first charset from the priority list. If you need to force a specific charset you have to specify it manually, as I did here: --==-=-= Content-Type: text/plain; charset=windows-1251 Content-Disposition: inline; filename=thing.txt Content-Transfer-Encoding: quoted-printable =F0=F3=F1=F1=EA=E8=E9 =F2=E5=EA=F1=F2 =E2 =EA=EF1251 --==-=-= Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." --==-=-=--