-specifies the header fields to highlight; if it matches the beginning of
-a header field, that whole field is highlighted.
-
- If you specify unusual colors for your text foreground and background,
-the colors used for highlighting may not go well with them. If so,
-specify different colors for the @code{highlight} face. That is worth
-doing because the @code{highlight} face is used for other kinds of
-highlighting as well. @xref{Faces}, for how to do this.
-
- To turn off highlighting entirely in Rmail, set
-@code{rmail-highlighted-headers} to @code{nil}.
-
-@findex goto-addr
-URLs in messages may be highlighted and activated for following with the
-mouse or keyboard by using the Goto-address package. Customize the hook
-@code{rmail-show-message-hook} to add @code{goto-addr}.
+specifies the header fields to highlight; if it matches the beginning
+of a header field, that whole field is highlighted.
+
+ If you specify unusual colors for your text foreground and
+background, the colors used for highlighting may not go well with
+them. If so, specify different colors by setting the variable
+@code{rmail-highlight-face} to a suitable face. To turn off
+highlighting entirely in Rmail, set @code{rmail-highlighted-headers}
+to @code{nil}.
+
+ You can highlight and activate URLs in incoming messages by adding
+the function @code{goto-address} to the hook
+@code{rmail-show-message-hook}. Then you can browse these URLs by
+clicking on them with @kbd{Mouse-2} (or @kbd{Mouse-1} quickly) or by
+moving to one and typing @kbd{C-c @key{RET}}. @xref{Goto-address,
+Activating URLs, Activating URLs}.
+
+@node Rmail Coding
+@section Rmail and Coding Systems
+
+@cindex decoding mail messages (Rmail)
+ Rmail automatically decodes messages which contain non-@acronym{ASCII}
+characters, just as Emacs does with files you visit and with subprocess
+output. Rmail uses the standard @samp{charset=@var{charset}} header in
+the message, if any, to determine how the message was encoded by the
+sender. It maps @var{charset} into the corresponding Emacs coding
+system (@pxref{Coding Systems}), and uses that coding system to decode
+message text. If the message header doesn't have the @samp{charset}
+specification, or if @var{charset} is not recognized,
+Rmail chooses the coding system with the usual Emacs heuristics and
+defaults (@pxref{Recognize Coding}).
+
+@cindex fixing incorrectly decoded mail messages
+ Occasionally, a message is decoded incorrectly, either because Emacs
+guessed the wrong coding system in the absence of the @samp{charset}
+specification, or because the specification was inaccurate. For
+example, a misconfigured mailer could send a message with a
+@samp{charset=iso-8859-1} header when the message is actually encoded
+in @code{koi8-r}. When you see the message text garbled, or some of
+its characters displayed as empty boxes, this may have happened.
+
+@findex rmail-redecode-body
+ You can correct the problem by decoding the message again using the
+right coding system, if you can figure out or guess which one is
+right. To do this, invoke the @kbd{M-x rmail-redecode-body} command.
+It reads the name of a coding system, encodes the message body using
+whichever coding system was used to decode it before, then redecodes
+it using the coding system you specified. If you specified the right
+coding system, the result should be readable.
+
+ Decoding and encoding using the wrong coding system is lossless for
+most encodings, in particular with 8-bit encodings such as iso-8859 or
+koi8. So, if the initial attempt to redecode the message didn't
+result in a legible text, you can try other coding systems until you
+succeed.
+
+ With some coding systems, notably those from the iso-2022 family,
+information can be lost in decoding, so that encoding the message
+again won't bring back the original incoming text. In such a case,
+@code{rmail-redecode-body} cannot work. However, the problems that
+call for use of @code{rmail-redecode-body} rarely occur with those
+coding systems. So in practice the command works when you need it.