Subject: Re: bug#1770: 23.0.60; (message-check 'illegible-text ...) fails on eight-bit chars

From: Kenichi Handa <[email-masked]>
Date: Fri, 16 Jan 2009 16:45:56 +0900

In article <[email-masked]>, Reiner Steib <[email-masked]> writes:

> On Wed, Jan 07 2009, Dave Love wrote:
> > Reiner Steib <[email-masked]> writes:
> >
>>> 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.
> >
> > You should ask handa about that and other Mule issues.  Experience shows
> > it's not helpful for me to explain.

> Cc-ed.

Yes.  For Emacs 23, adding eight-bit in the list is ok.
But, I think it is better to catch non-Unicode characters
(#x110000..#x3FFF7F) here too.  For Emacs 23 only, we can
have this simple code:

	(while (not (eobp))
	  (when (not (encode-char (char-after) 'unicode))
                ;; or simply (>= (char-after) #x110000)
	    (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))

> Added:

> 			   ;; FIXME: Wrong for Emacs 23 (unicode) and for
> 			   ;; things like undecodable utf-8 (in Emacs 21?).
> 			   ;; Should at least use find-coding-systems-region.
> 			   ;; -- fx

After filtering out those strange characters, how is a
coding system decided?  Is select-message-coding-system
used?

---
Kenichi Handa
[email-masked]