From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/67803 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general Subject: Re: Guidance concerning something I want to do with charsets Date: Wed, 19 Nov 2008 19:02:27 +0100 Message-ID: <87k5azh9vw.fsf@marauder.physik.uni-ulm.de> References: Reply-To: Reiner Steib NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1227118988 4605 80.91.229.12 (19 Nov 2008 18:23:08 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Nov 2008 18:23:08 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M16251@lists.math.uh.edu Wed Nov 19 19:24:11 2008 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 1L2rid-0006wE-9P for ding-account@gmane.org; Wed, 19 Nov 2008 19:24:03 +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 1L2rhB-0004N8-4V; Wed, 19 Nov 2008 12:22:33 -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 1L2rh8-0004Mq-58 for ding@lists.math.uh.edu; Wed, 19 Nov 2008 12:22:30 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtp (Exim 4.69) (envelope-from ) id 1L2rh4-0005IJ-Cg for ding@lists.math.uh.edu; Wed, 19 Nov 2008 12:22:30 -0600 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.36 #1 (Debian)) id 1L2rhE-0005d2-00 for ; Wed, 19 Nov 2008 19:22:36 +0100 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1L2rgy-0003Zd-W4 for ding@gnus.org; Wed, 19 Nov 2008 18:22:21 +0000 Original-Received: from p4fd46e0b.dip.t-dialin.net ([79.212.110.11]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 19 Nov 2008 18:22:20 +0000 Original-Received: from Reiner.Steib by p4fd46e0b.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 19 Nov 2008 18:22:20 +0000 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 88 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: p4fd46e0b.dip.t-dialin.net X-Face: .*T0'iU(sujq_j9\J>-d4fg;N/1++U#U$_5ii6k.=|"-n'?5O:Hyz&wi'-!I~,}7~GgT=0S /&-R5sbkNy5+Xo1y{Tw2KKxi@Xh"g@]Qc|.U<*]WDd)qvGowFDvfU1F]{EDho:7P0@|oOD=Bc{K4?> WP68K[Mx:}=`ZT'6g4'f+g?;`vri2!)xGy}3:=l'(/Cea0l4lo^H5#@/Z3ev Mail-Copies-To: nobody User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.1 (gnu/linux) Cancel-Lock: sha1:jowGlBycvV/Su6lYekPskPYycoQ= X-Spam-Score: -3.6 (---) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:67803 Archived-At: On Wed, Nov 19 2008, Lloyd Zusman wrote: > I'm not looking for someone to solve my problem for me or write my code; > rather, I'm just hoping that I could be given a very general overview of > what I need to do, with some pointers to the appropriate docs. I'll do > the rest. I have problems understanding what your problem is in the first place. > 3. This is the part that I know the least about. If the variable > described in Item 2 is `nil', then the logic described here is not > performed. However, if this variable is set to `t' for a given group, > then I want gnus to look at the Content-Type header of all incoming > messages in this group, and to use it as the charset for displaying > each of these messages. However, I want to make use of the following > specific logic (pseudo-code): > > if Content-Type specifies UTF-8 > use UTF-8 as the charset > else > use ISO-8859-1 as the charset That is the normal behavior of Gnus (and any other MIME-aware MUA). If you have problems with that, there's either a bug in your config (e.g. using Emacs in unibyte mode) or in Gnus. I can't think of a common use case for the `nil' case beside incorrect charset labelling of articles (e.g. declaring iso-8859-1 when it is utf-8). For this, you can use `gnus-summary-show-article-charset-alist' and the numerical prefix for `g': ,----[ (info "(gnus)Paging the Article") ] | `A g' | `g' | (Re)fetch the current article (`gnus-summary-show-article'). If | given a prefix, fetch the current article, but don't run any of | the article treatment functions. This will give you a "raw" | article, just the way it came from the server. | | If given a numerical prefix, you can do semi-manual charset | stuff. `C-u 0 g cn-gb-2312 RET' will decode the message as if it | were encoded in the `cn-gb-2312' charset. If you have | | (setq gnus-summary-show-article-charset-alist | '((1 . cn-gb-2312) | (2 . big5))) | | then you can say `C-u 1 g' to get the same effect. `---- > 4. In all cases, the charset selected via Items 1, 2, and 3 should be > used both for decoding the message for display *and* for encoding my > replies and follow-ups. Why do you think that this is useful? > Is this a common set of tasks which are easy to perform in gnus, or am I > trying to do something that is as idiosyncratic as many of the other > tasks that I tend to want to perform? Gnus already does The Right Thing by default. You can specify which charsets to prefer via `mm-coding-system-priorities': ,----[ v mm-coding-system-priorities RET ] | mm-coding-system-priorities is a variable defined in `mm-util.el'. | Its value is | (iso-8859-1 iso-8859-15 utf-8) | | Documentation: | Preferred coding systems for encoding outgoing messages. | | More than one suitable coding system may be found for some text. | By default, the coding system with the highest priority is used | to encode outgoing messages (see `sort-coding-systems'). If this | variable is set, it overrides the default priority. | | You can customize this variable. `---- For Spanish, the value above is sensible. If you don't care about 20th century clients, you may simply use '(utf-8). Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/