From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/61139 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general Subject: Display unknown non-ASCII chars as `.', `X' or `?' (was: Setup additional charsets on demand) Date: Wed, 12 Oct 2005 00:19:39 +0200 Organization: Dept. of Theoretical Physics, University of Ulm Message-ID: References: Reply-To: Reiner Steib NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: sea.gmane.org 1129069712 4590 80.91.229.2 (11 Oct 2005 22:28:32 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 11 Oct 2005 22:28:32 +0000 (UTC) Original-X-From: ding-owner+m9672=ding+2daccount=gmane.org@lists.math.uh.edu Wed Oct 12 00:28:30 2005 Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EPSZY-0003VY-Oa for ding-account@gmane.org; Wed, 12 Oct 2005 00:26:13 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1EPSZX-0003zS-04 for ding-account@gmane.org; Tue, 11 Oct 2005 17:26:12 -0500 Original-Received: from nas01.math.uh.edu ([129.7.128.39]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1EPSYP-0003yu-00 for ding@lists.math.uh.edu; Tue, 11 Oct 2005 17:25:01 -0500 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas01.math.uh.edu with esmtp (Exim 4.52) id 1EPSYI-0002Sc-6K for ding@lists.math.uh.edu; Tue, 11 Oct 2005 17:25:01 -0500 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1EPSYE-0001tA-00 for ; Wed, 12 Oct 2005 00:24:50 +0200 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1EPSU8-0002RM-Ex for ding@gnus.org; Wed, 12 Oct 2005 00:20:36 +0200 Original-Received: from bridgekeeper.physik.uni-ulm.de ([134.60.10.123]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Oct 2005 00:20:36 +0200 Original-Received: from Reiner.Steib by bridgekeeper.physik.uni-ulm.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 12 Oct 2005 00:20:36 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-To: ding@gnus.org Original-Lines: 52 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: bridgekeeper.physik.uni-ulm.de X-Face: 'bg&jY[8V'W&:=~6w"|>}#4/T;w~36ei4NNMyKRR.a$n=$|sWFPF1y]a\>6kc\*#GN]UDM| Ywv,vbL^XF1nIp\:F=$Ei2o&mEe:%N~,:3]vtQ~s9u$9izmX$IF@VgGl7/,^dbuM<3|AO2}.%|%?kZ 2Y=@\U!~cll^=8Z9ihKq%wmUe1Ky(#kl3T'>Qk0Ia3mCBsTk?E(,X Mail-Copies-To: nobody User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:3HNQo14/Fu4rHi8miqTrsECax7A= X-Spam-Score: -2.4 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:61139 Archived-At: On Tue, Oct 11 2005, Reiner Steib wrote: > in reaction to Matthias Andree's posting[1]... > > ,----[ http://thread.gmane.org/gmane.emacs.gnus.general/59971 ] > | What's up here? Does Gnus lack Windows-1251? If so, why does it not > | replace everything by dots, X or ?. If it supports Windows-1251, why > | doesn't it see it? [...] (Emacs 21.3 with rm'd movemail) > `---- > > ... I added `mm-charset-eval-alist' to the trunk now. While at it... | If so, why does it not replace everything by dots, X or ?. I.e. if the charset is not available: How can we configure Gnus to display every non-ASCII chars as `.', `X' or `?'? One solution is to define a "dummy coding system" where all non-ASCII chars are replaced by some place holder: (defun rs-ucs-ascii-8bit-dumb (&optional char) "Create dummy coding system `rs-ucs-ascii-8bit-dumb'." (unless char (setq char ?\?)) ;; We need cp-make-coding-system (Emacs 22) (unless (fboundp 'cp-make-coding-system) (error "Function requires `cp-make-coding-system'")) (cp-make-coding-system rs-ucs-ascii-8bit-dumb (make-vector 128 char) (format "Dummy coding system. Replace all non-ASCII chars as `%c'." char) ?\?)) (rs-ucs-ascii-8bit-dumb ?¿) (add-to-list 'mm-charset-override-alist '(undecided . rs-ucs-ascii-8bit-dumb)) With this, also non-ASCII chars in postings without proper MIME headers[1] will be displayed as `¿'. (IIRC, slrn and tin replace unknown characters with `?'. Some people like this and turn off fallbacks like iso-8859-1.) Can we achieve the same without using functions from Emacs 22 (`cp-make-coding-system')? Bye, Reiner. [1] Some examples: , -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/