From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/68038 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general 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__29689.2784223475$1230935108$gmane$org@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 1230935031 28938 80.91.229.12 (2 Jan 2009 22:23:51 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 2 Jan 2009 22:23:51 +0000 (UTC) To: emacs-pretest-bug@gnu.org Original-X-From: ding-owner+M16483@lists.math.uh.edu Fri Jan 02 23:25:00 2009 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.50) id 1LIsRr-0006rN-N9 for ding-account@gmane.org; Fri, 02 Jan 2009 23:24:56 +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 1LIsQY-0007DI-ON; Fri, 02 Jan 2009 16:23:34 -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 1LIsQW-0007Cs-VY for ding@lists.math.uh.edu; Fri, 02 Jan 2009 16:23:32 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1LIsQT-0007LC-Aw for ding@lists.math.uh.edu; Fri, 02 Jan 2009 16:23:32 -0600 Original-Received: from rzlab.ucr.edu ([138.23.92.77]) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1LIsQi-0004v4-00; Fri, 02 Jan 2009 23:23:44 +0100 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: 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-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-6.1 required=4.0 tests=FOURLA,HAS_PACKAGE, IMPRONONCABLE_1,IMPRONONCABLE_2,MDO_CABLE_TV3,MDO_DATING2,MURPHY_WRONG_WORD2, X_DEBBUGS_CC autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 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-Spam-Score: -2.6 (--) List-ID: Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Resent-Date: Fri, 02 Jan 2009 16:23:34 -0600 Xref: news.gmane.org gmane.emacs.gnus.general:68038 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/