From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.bugs,gmane.emacs.pretest.bugs Subject: bug#1770: 23.0.60; (message-check 'illegible-text ...) fails on eight-bit chars Date: Fri, 02 Jan 2009 23:09:41 +0100 Message-ID: <87k59d4apn.fsf@marauder.physik.uni-ulm.de> Reply-To: Reiner Steib , 1770@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1230935027 28925 80.91.229.12 (2 Jan 2009 22:23:47 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Jan 2009 22:23:47 +0000 (UTC) To: emacs-pretest-bug@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jan 02 23:24:54 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1LIsRn-0006qX-8C for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Jan 2009 23:24:52 +0100 Original-Received: from localhost ([127.0.0.1]:33694 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LIsQY-0001Ff-36 for geb-bug-gnu-emacs@m.gmane.org; Fri, 02 Jan 2009 17:23:34 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LIsQT-0001ET-In for bug-gnu-emacs@gnu.org; Fri, 02 Jan 2009 17:23:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LIsQR-0001Bk-QX for bug-gnu-emacs@gnu.org; Fri, 02 Jan 2009 17:23:28 -0500 Original-Received: from [199.232.76.173] (port=53469 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LIsQR-0001BZ-Km for bug-gnu-emacs@gnu.org; Fri, 02 Jan 2009 17:23:27 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:53073) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LIsQP-0001Bq-20; Fri, 02 Jan 2009 17:23:25 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n02MNMxI024976; Fri, 2 Jan 2009 14:23:23 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.13.8/8.13.8/Submit) id n02MK3DD023836; Fri, 2 Jan 2009 14:20:03 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: Reiner Steib Resent-To: bug-submit-list@donarmstrong.com Resent-CC: ding@gnus.org, Dave Love , Emacs Bugs , Gnus Resent-Date: Fri, 02 Jan 2009 22:20:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 1770 X-Emacs-PR-Package: emacs,gnus X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.123093449022560 (code B ref -1); Fri, 02 Jan 2009 22:20:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 2 Jan 2009 22:14:50 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n02MEf9R022548 for ; Fri, 2 Jan 2009 14:14:43 -0800 Original-Received: from mail.gnu.org ([199.232.76.166]:54255 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LIsGt-0005YA-8n for emacs-pretest-bug@gnu.org; Fri, 02 Jan 2009 17:13:35 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LIsHs-0000Q9-R3 for emacs-pretest-bug@gnu.org; Fri, 02 Jan 2009 17:14:40 -0500 Original-Received: from mail.uni-ulm.de ([134.60.1.11]:61258) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LIsHs-0000PX-4d for emacs-pretest-bug@gnu.org; Fri, 02 Jan 2009 17:14:36 -0500 Original-Received: from bridgekeeper.physik.uni-ulm.de (bridgekeeper.physik.uni-ulm.de [134.60.10.175]) by mail.uni-ulm.de (8.14.2/8.14.2) with ESMTP id n02MEVjB026847 for ; Fri, 2 Jan 2009 23:14:32 +0100 (MET) Original-Received: from localhost (localhost [127.0.0.1]) by bridgekeeper.physik.uni-ulm.de (Postfix) with ESMTP id AE6E6131A4 for ; Fri, 2 Jan 2009 23:14:31 +0100 (CET) X-Face: /U7=m^"/-Dn61mAl{g9e3>\G5Tp,oEX|V)g2I1hBk\ML; )7A?6cmB-y7y?'NA^J<=oz7syB =(McAwIHgLX!.B?R3X}98d@?>CrT094KLWh]WU4gDpnL/")MS(XoQTv`Oq225uL>+; CpPXo$N5e>N> $tPd-gbB^F{gQS#1ase]XO~D4p4M"3+F-7~u]dy3I?Pb8RO*H-EFeWDUf?Rf, d]pv\Jvh2Cht!A=im yKAS2Z%Ao^;}W/qzMvMm User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.1 (gnu/linux) X-DCC-Misty-Metrics: poseidon 1170; Body=1 Fuz1=1 Fuz2=1 X-Virus-Scanned: by amavisd-new X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Resent-Date: Fri, 02 Jan 2009 17:23:28 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:23706 gmane.emacs.pretest.bugs:23599 Archived-At: Package: emacs,gnus Version: 23.0.60 When replying to an article with a bogus charset declaration (e.g. charset="ISO 8859-15" produced by Knode; "ISO-8859-15" would be correct. An example in gmane.test is <873ag15s04.not-fsf@marauder.physik.uni-ulm.de>) with Gnus, the buffer contains eight-bit-control characters. When sending the reply, Gnus asks: "Use ASCII as charset? " (see `mml-parse-1'). Option 1: Answer `y'. Result: The reply is sent with charset=us-ascii, but it contains 8bit characters. Option 2: Answer `n'. The Gnus asks a second time. Answer `n' again. Result: The same as above. See <87wsddtn9r.fsf@marauder.physik.uni-ulm.de> in gmane.test Expected behavior: This following code from `message-fix-before-sending' should kick in: (This is what happens in Emacs 22 with current Gnus CVS trunk, i.e. the same Gnus code base as Emacs 23.) (message-check 'illegible-text (let (char found choice) (message-goto-body) (while (progn (skip-chars-forward mm-7bit-chars) (when (get-text-property (point) 'no-illegible-text) ;; There is a signed or encrypted raw message part ;; that is considered to be safe. (goto-char (or (next-single-property-change (point) 'no-illegible-text) (point-max)))) (setq char (char-after))) (when (or (< (mm-char-int char) 128) (and (mm-multibyte-p) (memq (char-charset char) '(eight-bit-control eight-bit-graphic control-1)) (not (get-text-property (point) 'untranslated-utf-8)))) (message-overlay-put (message-make-overlay (point) (1+ (point))) 'face 'highlight) (setq found t)) (forward-char)) (when found (setq choice (gnus-multiple-choice "Non-printable characters found. Continue sending?" `((?d "Remove non-printable characters and send") (?r ,(format "Replace non-printable characters with \"%s\" and send" message-replacement-char)) (?i "Ignore non-printable characters and send") (?e "Continue editing")))) (if (eq choice ?e) (error "Non-printable characters")) (message-goto-body) (skip-chars-forward mm-7bit-chars) (while (not (eobp)) (when (let ((char (char-after))) (or (< (mm-char-int char) 128) (and (mm-multibyte-p) ;; FIXME: Wrong for Emacs 23 (unicode) and for ;; things like undecable utf-8. Should at least ;; use find-coding-systems-region. (memq (char-charset char) '(eight-bit-control eight-bit-graphic control-1)) (not (get-text-property (point) 'untranslated-utf-8))))) (if (eq choice ?i) (message-kill-all-overlays) (delete-char 1) (when (eq choice ?r) (insert message-replacement-char)))) (forward-char) (skip-chars-forward mm-7bit-chars))))) In Emacs 23, (char-charset char) returns `eight-bit'. Is adding eight-bit next to eight-bit-graphic sufficient? The comment (by Dave Love, CC-ed if I got X-Debbugs-CC right) seems to suggest that there's more to be done. Bye, Reiner. In GNU Emacs 23.0.60.1 (i686-pc-linux-gnu, GTK+ Version 2.12.9) of 2009-01-01 on primula Windowing system distributor `The X.Org Foundation', version 11.0.10400090 Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/