Gnus development mailing list
 help / color / mirror / Atom feed
From: Simon Josefsson <jas@extundo.com>
Subject: Re: utf-8 -> latin-X if possible
Date: Sat, 04 May 2002 16:08:43 +0200	[thread overview]
Message-ID: <iluadrghuok.fsf@extundo.com> (raw)
In-Reply-To: <ilusn585emt.fsf@extundo.com> (Simon Josefsson's message of "Sat, 04 May 2002 13:36:10 +0200")

(Talking to myself...)

Simon Josefsson <jas@extundo.com> writes:

> How do I get Gnus to send it using latin-X, if possible, instead?

Emacs config to make it Unicode friendly:

  (prefer-coding-system 'utf-8)

Gnus config to make it revert to iso-8859-1 when possible:

 '(mm-coding-system-priorities (quote (iso-latin-1)))

> Wouldn't it be nice if there were a section explaining this stuff in
> the manual?  I'll write it when I get this to work the way I want.

Yup.  I changed the Emacs MIME manual to be a users manual, relevant
sections included below.  If someone who knows English and/or Mule
reads it, please fix it.

Encoding Customization
======================

`mm-body-charset-encoding-alist'
     Mapping from MIME charset to encoding to use.  This variable is
     usually used except, e.g., when other requirements force a specific
     encoding (digitally signed messages require 7bit encodings).  The
     default is `((iso-2022-jp . 7bit) (iso-2022-jp-2 . 7bit))'.  As an
     example, if you do not want to have ISO-8859-1 characters
     quoted-printable encoded, you may add `(iso-8859-1 . 8bit)' to
     this variable.  You can override this setting on a per-message
     basis by using the `encoding' MML tag (*note MML Definition::).

`mm-coding-system-priorities'
     Prioritize coding systems to use for outgoing messages.  The
     default is nil, which means to use the defaults in Emacs.  It is a
     list of coding system symbols (aliases of coding systems does not
     work, use `M-x describe-coding-system' to make sure you are not
     specifying an alias in this variable).  For example, if you have
     configured Emacs to use prefer UTF-8, but wish that outgoing
     messages should be sent in ISO-8859-1 if possible, you can set
     this variable to `(iso-latin-1)'.

`mm-content-transfer-encoding-defaults'
     Mapping from MIME types to encoding to use.  This variable is
     usually used except, e.g., when other requirements force a safer
     encoding (digitally signed messages require 7bit encoding).
     Besides the normal MIME encodings, `qp-or-base64' may be used to
     indicate that for each case the most efficient of quoted-printable
     and base64 should be used.  You can override this setting on a
     per-message basis by using the `encoding' MML tag (*note MML
     Definition::).

`mm-use-ultra-safe-encoding'
     When this is non-nil, it means that textual parts are encoded as
     quoted-printable if they contain lines longer than 76 characters or
     starting with "From " in the body.  Non-7bit encodings (8bit,
     binary) are generally disallowed.  This reduce the probability
     that a non-8bit clean MTA or MDA changes the message.  This should
     never be set directly, but bound by other functions when necessary
     (e.g., when encoding messages that are to be digitally signed).

Charset Translation
===================

   During translation from MML to MIME, for each MIME part which has
been composed inside Emacs, an appropriate charset has to be chosen.

   If you are running a non-MULE Emacs, this process is simple: If the
part contains any non-ASCII (8-bit) characters, the MIME charset given
by `mail-parse-charset' (a symbol) is used.  (Never set this variable
directly, though.  If you want to change the default charset, please
consult the documentation of the package which you use to process MIME
messages.  *Note Various Message Variables: (message)Various Message
Variables, for example.)  If there are only ASCII characters, the MIME
charset US-ASCII is used, of course.

   Things are slightly more complicated when running Emacs with MULE
support.  In this case, a list of the MULE charsets used in the part is
obtained, and the MULE charsets are translated to MIME charsets by
consulting the variable `mm-mime-mule-charset-alist'.  If this results
in a single MIME charset, this is used to encode the part.  But if the
resulting list of MIME charsets contains more than one element, two
things can happen: If it is possible to encode the part via UTF-8, this
charset is used.  (For this, Emacs must support the `utf-8' coding
system, and the part must consist entirely of characters which have
Unicode counterparts.)  If UTF-8 is not available for some reason, the
part is split into several ones, so that each one can be encoded with a
single MIME charset.  The part can only be split at line boundaries,
though--if more than one MIME charset is required to encode a single
line, it is not possible to encode the part.

   When running Emacs with MULE support, the preferences for which
coding system to use is inherited from Emacs itself.  This means that
if Emacs is set up to prefer UTF-8, it will be used when encoding
messages.  You can modify this by altering the
`mm-coding-system-priorities' variable though (*note Encoding
Customization::).

   The charset to be used can be overriden by setting the `charset' MML
tag (*note MML Definition::) when composing the message.

   The encoding of characters (quoted-printable, 8bit etc) is orthogonal
to the discussion here, and is controlled by the variables
`mm-body-charset-encoding-alist' and
`mm-content-transfer-encoding-defaults' (*note Encoding
Customization::).




  reply	other threads:[~2002-05-04 14:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-04 11:36 Simon Josefsson
2002-05-04 14:08 ` Simon Josefsson [this message]
2002-05-04 14:45 ` Torsten Hilbrich
2002-05-05 12:06 ` Kai Großjohann
2002-05-05 15:06   ` Simon Josefsson
2002-05-05 15:24     ` Kai Großjohann
2002-05-05 15:49       ` Simon Josefsson
2002-05-05 16:01         ` Kai Großjohann
2002-05-05 16:06           ` Simon Josefsson
2002-05-05 16:06           ` Kai Großjohann
2002-05-06 10:01             ` Kai Großjohann
2002-05-06 10:09               ` Bjørn Mork
2002-05-06 11:37                 ` Kai Großjohann
2002-05-06 13:18                   ` frank paulsen
2002-05-06 13:28                   ` Kai Großjohann

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

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

  git send-email \
    --in-reply-to=iluadrghuok.fsf@extundo.com \
    --to=jas@extundo.com \
    /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.
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 NNTP newsgroup(s).