From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nic Ferrier Newsgroups: gmane.emacs.devel Subject: Re: Do you understand this? Date: Sun, 06 Mar 2005 20:44:21 +0000 Message-ID: <87sm38jyhm.fsf@tapsellferrier.co.uk> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1110141809 6551 80.91.229.2 (6 Mar 2005 20:43:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 6 Mar 2005 20:43:29 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 06 21:43:29 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D82aO-0005QR-T1 for ged-emacs-devel@m.gmane.org; Sun, 06 Mar 2005 21:42:49 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D82u1-0003Z1-Gi for ged-emacs-devel@m.gmane.org; Sun, 06 Mar 2005 16:03:05 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D82tq-0003Yg-4p for emacs-devel@gnu.org; Sun, 06 Mar 2005 16:02:54 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D82tp-0003Y1-23 for emacs-devel@gnu.org; Sun, 06 Mar 2005 16:02:53 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D82to-0003Xr-Oo for emacs-devel@gnu.org; Sun, 06 Mar 2005 16:02:52 -0500 Original-Received: from [80.168.156.78] (helo=owls-tree.tapsellferrier.co.uk) by monty-python.gnu.org with esmtp (TLSv1:RC4-SHA:128) (Exim 4.34) id 1D82em-0005yR-8w; Sun, 06 Mar 2005 15:47:20 -0500 Original-Received: from [80.168.156.68] (helo=kanga) by owls-tree.tapsellferrier.co.uk with esmtp (Exim 4.30 #1 (Debian)) id 1D82cD-0002st-Ms; Sun, 06 Mar 2005 20:44:41 +0000 Original-Received: from nferrier by kanga with local (Exim 4.44) id 1D82bu-0002fx-4P; Sun, 06 Mar 2005 20:44:22 +0000 Original-To: rms@gnu.org In-Reply-To: (Richard Stallman's message of "Sun, 06 Mar 2005 14:11:19 -0500") X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: news.gmane.org gmane.emacs.devel:34246 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:34246 Richard Stallman writes: > Here's some text in man/url.texi that I don't understand. > > HTTP allows specifying a list of MIME charsets which indicate your > preferred character set encodings, e.g.@: Latin-9 or Big5, and these > can be weighted. This list is generated automatically from the list > of defined coding systems which have associated MIME types. These are > sorted by coding priority. > > I am not sure what "these can be weighted" means, or what is > generated from what. Can someone please clarify this? I don't know the specific code but I know about HTTP so here's an explanation from that bias. An HTTP request can specify the MIME types / charsets that are accepted by the client. User agents can make the specification with floating point values. An example, from the HTTP spec (rfc2616) is: Accept: text/plain; q=0.5, text/html, text/x-dvi; q=0.8, text/x-c If sent in an HTTP request for a resource /fred the above Accept headers tells the server that the user will ideally accept /fred as an HTML document or a text/x-c document. If those reprsentations are not available then dvi is next preference. If none of those are available then plain text should be sent. If plain text is not acceptable then the response would indicate a failure to find a representation that satisfied the user's specifications. This applies equally to charsets as well as type representations like text/html and text/plain. You could, for exakple say this: Accept: text/html; charset=utf-8; q=0.5, text/html; charset=iso-8859-1; q=0.3, So when Emacs makes an HTTP request it should state the character sets that Emacs could use to display a response in a buffer. So the Accept header is generated automatically from the list of available encodings. Nic