unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Nic Ferrier <nferrier@tapsellferrier.co.uk>
Cc: emacs-devel@gnu.org
Subject: Re: Do you understand this?
Date: Sun, 06 Mar 2005 20:44:21 +0000	[thread overview]
Message-ID: <87sm38jyhm.fsf@tapsellferrier.co.uk> (raw)
In-Reply-To: <E1D819r-0003Ns-C2@fencepost.gnu.org> (Richard Stallman's message of "Sun, 06 Mar 2005 14:11:19 -0500")

Richard Stallman <rms@gnu.org> 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

  reply	other threads:[~2005-03-06 20:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-06 19:11 Do you understand this? Richard Stallman
2005-03-06 20:44 ` Nic Ferrier [this message]
2005-03-06 22:32   ` Robert J. Chassell
2005-03-06 22:58     ` Andreas Schwab
2005-03-06 23:05     ` Jason Rumney
2005-03-07 15:37       ` Robert J. Chassell
2005-03-07 17:10         ` Jason Rumney
2005-03-07 23:46           ` Robert J. Chassell
2005-03-08  0:34             ` Nic Ferrier
2005-03-08 18:41               ` Robert J. Chassell
2005-03-09 16:58                 ` Richard Stallman
2005-03-06 23:12     ` Nic Ferrier

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sm38jyhm.fsf@tapsellferrier.co.uk \
    --to=nferrier@tapsellferrier.co.uk \
    --cc=emacs-devel@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).