+@vindex auto-coding-regexp-alist
+@vindex auto-coding-functions
+ The variables @code{auto-coding-alist},
+@code{auto-coding-regexp-alist} and @code{auto-coding-functions} are
+the strongest way to specify the coding system for certain patterns of
+file names, or for files containing certain patterns; these variables
+even override @samp{-*-coding:-*-} tags in the file itself. Emacs
+uses @code{auto-coding-alist} for tar and archive files, to prevent it
+from being confused by a @samp{-*-coding:-*-} tag in a member of the
+archive and thinking it applies to the archive file as a whole.
+Likewise, Emacs uses @code{auto-coding-regexp-alist} to ensure that
+RMAIL files, whose names in general don't match any particular
+pattern, are decoded correctly. One of the builtin
+@code{auto-coding-functions} detects the encoding for XML files.
+
+@vindex rmail-decode-mime-charset
+ When you get new mail in Rmail, each message is translated
+automatically from the coding system it is written in, as if it were a
+separate file. This uses the priority list of coding systems that you
+have specified. If a MIME message specifies a character set, Rmail
+obeys that specification, unless @code{rmail-decode-mime-charset} is
+@code{nil}.
+
+@vindex rmail-file-coding-system
+ For reading and saving Rmail files themselves, Emacs uses the coding
+system specified by the variable @code{rmail-file-coding-system}. The
+default value is @code{nil}, which means that Rmail files are not
+translated (they are read and written in the Emacs internal character
+code).
+
+@node Specify Coding
+@section Specifying a File's Coding System
+
+ If Emacs recognizes the encoding of a file incorrectly, you can
+reread the file using the correct coding system by typing @kbd{C-x
+@key{RET} r @var{coding-system} @key{RET}}. To see what coding system
+Emacs actually used to decode the file, look at the coding system
+mnemonic letter near the left edge of the mode line (@pxref{Mode
+Line}), or type @kbd{C-h C @key{RET}}.
+
+@vindex coding
+ You can specify the coding system for a particular file in the file
+itself, using the @w{@samp{-*-@dots{}-*-}} construct at the beginning,
+or a local variables list at the end (@pxref{File Variables}). You do
+this by defining a value for the ``variable'' named @code{coding}.
+Emacs does not really have a variable @code{coding}; instead of
+setting a variable, this uses the specified coding system for the
+file. For example, @samp{-*-mode: C; coding: latin-1;-*-} specifies
+use of the Latin-1 coding system, as well as C mode. When you specify
+the coding explicitly in the file, that overrides
+@code{file-coding-system-alist}.
+
+ If you add the character @samp{!} at the end of the coding system
+name in @code{coding}, it disables any character translation
+(@pxref{Character Translation}) while decoding the file. This is
+useful when you need to make sure that the character codes in the
+Emacs buffer will not vary due to changes in user settings; for
+instance, for the sake of strings in Emacs Lisp source files.
+
+@node Output Coding
+@section Choosing Coding Systems for Output