From: Reiner Steib <reinersteib+gmane@imap.cc>
To: emacs-pretest-bug@gnu.org
Subject: bug#1770: 23.0.60; (message-check 'illegible-text ...) fails on eight-bit chars
Date: Fri, 02 Jan 2009 23:09:41 +0100 [thread overview]
Message-ID: <87k59d4apn.fsf@marauder.physik.uni-ulm.de> (raw)
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/
next reply other threads:[~2009-01-02 22:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-02 22:09 Reiner Steib [this message]
2009-01-03 3:23 ` bug#1770: 23.0.60; (message-check 'illegible-text ...) fails on eight-bit chars Stefan Monnier
2009-01-07 21:41 ` Dave Love
[not found] ` <gk38s6$pa7$2@quimby.gnus.org>
2009-01-08 20:28 ` Reiner Steib
2009-01-16 7:45 ` Kenichi Handa
2010-09-30 17:48 ` Lars Magne Ingebrigtsen
2010-10-14 6:37 ` Kenichi Handa
2010-10-14 19:19 ` Lars Magne Ingebrigtsen
2011-01-24 2:55 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k59d4apn.fsf@marauder.physik.uni-ulm.de \
--to=reinersteib+gmane@imap.cc \
--cc=1770@emacsbugs.donarmstrong.com \
--cc=Reiner.Steib@gmx.de \
--cc=emacs-pretest-bug@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.