]> code.delx.au - gnu-emacs/blobdiff - man/mule.texi
(clipboard_sequence_fn): New variable.
[gnu-emacs] / man / mule.texi
index e6448760f9d68b8bcc94a8237d8b79cb70089d34..ccba75e93278deaa3eb813d18b6f632dbab7f4c6 100644 (file)
@@ -75,7 +75,9 @@ your keyboard can produce non-ASCII characters, you can select an
 appropriate keyboard coding system (@pxref{Specify Coding}), and Emacs
 will accept those characters.  Latin-1 characters can also be input by
 using the @kbd{C-x 8} prefix, see @ref{Single-Byte Character Support,
-C-x 8}.
+C-x 8}.  On X Window systems, your locale should be set to an
+appropriate value to make sure Emacs interprets keyboard input
+correctly; see @ref{Language Environments, locales}.
 @end itemize
 
   The rest of this chapter describes these issues in detail.
@@ -98,6 +100,7 @@ C-x 8}.
 * Single-Byte Character Support::
                             You can pick one European character set
                             to use without multibyte characters.
+* Charsets::                How Emacs groups its internal character codes.
 @end menu
 
 @node International Chars
@@ -132,28 +135,6 @@ language, to make it convenient to type them.
   The prefix key @kbd{C-x @key{RET}} is used for commands that pertain
 to multibyte characters, coding systems, and input methods.
 
-@ignore
-@c This is commented out because it doesn't fit here, or anywhere.
-@c This manual does not discuss "character sets" as they
-@c are used in Mule, and it makes no sense to mention these commands
-@c except as part of a larger discussion of the topic.
-@c But it is not clear that topic is worth mentioning here,
-@c since that is more of an implementation concept
-@c than a user-level concept.  And when we switch to Unicode,
-@c character sets in the current sense may not even exist.
-
-@findex list-charset-chars
-@cindex characters in a certain charset
-  The command @kbd{M-x list-charset-chars} prompts for a name of a
-character set, and displays all the characters in that character set.
-
-@findex describe-character-set
-@cindex character set, description
-  The command @kbd{M-x describe-character-set} prompts for a character
-set name and displays information about that character set, including
-its internal representation within Emacs.
-@end ignore
-
 @node Enabling Multibyte
 @section Enabling Multibyte Characters
 
@@ -217,13 +198,13 @@ characters.
 you used @samp{--unibyte}.  This includes the Emacs initialization
 file, @file{.emacs}, and the initialization files of Emacs packages
 such as Gnus.  However, you can specify unibyte loading for a
-particular Lisp file, by putting @samp{-*-unibyte: t;-*-} in a comment
-on the first line.  Then that file is always loaded as unibyte text,
-even if you did not start Emacs with @samp{--unibyte}.  The motivation
-for these conventions is that it is more reliable to always load any
-particular Lisp file in the same way.  However, you can load a Lisp
-file as unibyte, on any one occasion, by typing @kbd{C-x @key{RET} c
-raw-text @key{RET}} immediately before loading it.
+particular Lisp file, by putting @w{@samp{-*-unibyte: t;-*-}} in a
+comment on the first line.  Then that file is always loaded as unibyte
+text, even if you did not start Emacs with @samp{--unibyte}.  The
+motivation for these conventions is that it is more reliable to always
+load any particular Lisp file in the same way.  However, you can load
+a Lisp file as unibyte, on any one occasion, by typing @kbd{C-x
+@key{RET} c raw-text @key{RET}} immediately before loading it.
 
   The mode line indicates whether multibyte character support is enabled
 in the current buffer.  If it is, there are two or more characters (most
@@ -251,20 +232,22 @@ Each language environment also specifies a default input method.
 
 @findex set-language-environment
 @vindex current-language-environment
-  To select a language environment, customize the option
+  To select a language environment, you can customize the variable
 @code{current-language-environment} or use the command @kbd{M-x
 set-language-environment}.  It makes no difference which buffer is
 current when you use this command, because the effects apply globally to
 the Emacs session.  The supported language environments include:
 
 @cindex Euro sign
+@cindex UTF-8
 @quotation
 Chinese-BIG5, Chinese-CNS, Chinese-GB, Cyrillic-ALT, Cyrillic-ISO,
-Cyrillic-KOI8, Czech, Devanagari, English, Ethiopic, German, Greek,
-Hebrew, IPA, Japanese, Korean, Lao, Latin-1, Latin-2, Latin-3, Latin-4,
-Latin-5, Latin-8 (Celtic), Latin-9 (updated Latin-1, with the Euro
-sign), Polish, Romanian, Slovak, Slovenian, Thai, Tibetan, Turkish, 
-Dutch, Spanish, and Vietnamese.
+Cyrillic-KOI8, Czech, Devanagari, Dutch, English, Ethiopic, German,
+Greek, Hebrew, IPA, Japanese, Korean, Lao, Latin-1, Latin-2, Latin-3,
+Latin-4, Latin-5, Latin-8 (Celtic), Latin-9 (updated Latin-1, with the
+Euro sign), Polish, Romanian, Slovak, Slovenian, Spanish, Thai, Tibetan,
+Turkish, UTF-8 (for a setup which prefers Unicode characters and files
+encoded in UTF-8), and Vietnamese.
 @end quotation
 
 @cindex fonts for various scripts
@@ -297,8 +280,9 @@ against entries in the value of the variables
 @code{locale-charset-language-names} and @code{locale-language-names},
 and selects the corresponding language environment if a match is found.
 (The former variable overrides the latter.)  It also adjusts the display
-table and terminal coding system, the locale coding system, and the
-preferred coding system as needed for the locale.
+table and terminal coding system, the locale coding system, the
+preferred coding system as needed for the locale, and---last but not
+least---the way Emacs decodes non-ASCII characters sent by your keyboard.
 
   If you modify the @env{LC_ALL}, @env{LC_CTYPE}, or @env{LANG}
 environment variables while running Emacs, you may want to invoke the
@@ -363,9 +347,9 @@ characters can share one input method.  A few languages support several
 input methods.
 
   The simplest kind of input method works by mapping ASCII letters
-into another alphabet; this allows you to type characters which your
-keyboard doesn't support directly.  This is how the Greek and Russian
-input methods work.
+into another alphabet; this allows you to use one other alphabet
+instead of ASCII.  The Greek and Russian input methods
+work this way.
 
   A more powerful technique is composition: converting sequences of
 characters into one letter.  Many European input methods use composition
@@ -383,20 +367,40 @@ mapped into one syllable sign.
 
   Chinese and Japanese require more complex methods.  In Chinese input
 methods, first you enter the phonetic spelling of a Chinese word (in
-input method @code{chinese-py}, among others), or a sequence of portions
-of the character (input methods @code{chinese-4corner} and
-@code{chinese-sw}, and others).  Since one phonetic spelling typically
-corresponds to many different Chinese characters, you must select one of
-the alternatives using special Emacs commands.  Keys such as @kbd{C-f},
-@kbd{C-b}, @kbd{C-n}, @kbd{C-p}, and digits have special definitions in
-this situation, used for selecting among the alternatives.  @key{TAB}
-displays a buffer showing all the possibilities.
-
-   In Japanese input methods, first you input a whole word using
-phonetic spelling; then, after the word is in the buffer, Emacs converts
-it into one or more characters using a large dictionary.  One phonetic
-spelling corresponds to many differently written Japanese words, so you
-must select one of them; use @kbd{C-n} and @kbd{C-p} to cycle through
+input method @code{chinese-py}, among others), or a sequence of
+portions of the character (input methods @code{chinese-4corner} and
+@code{chinese-sw}, and others).  One input sequence typically
+corresponds to many possible Chinese characters.  You select the one
+you mean using keys such as @kbd{C-f}, @kbd{C-b}, @kbd{C-n},
+@kbd{C-p}, and digits, which have special meanings in this situation.
+
+  The possible characters are conceptually arranged in several rows,
+with each row holding up to 10 alternatives.  Normally, Emacs displays
+just one row at a time, in the echo area; @code{(@var{i}/@var{j})}
+appears at the beginning, to indicate that this is the @var{i}th row
+out of a total of @var{j} rows.  Type @kbd{C-n} or @kbd{C-p} to
+display the next row or the previous row.
+
+    Type @kbd{C-f} and @kbd{C-b} to move forward and backward among
+the alternatives in the current row.  As you do this, Emacs highlights
+the current alternative with a special color; type @code{C-@key{SPC}}
+to select the current alternative and use it as input.  The
+alternatives in the row are also numbered; the number appears before
+the alternative.  Typing a digit @var{n} selects the @var{n}th
+alternative of the current row and uses it as input.
+
+  @key{TAB} in these Chinese input methods displays a buffer showing
+all the possible characters at once; then clicking @kbd{Mouse-2} on
+one of them selects that alternative.  The keys @kbd{C-f}, @kbd{C-b},
+@kbd{C-n}, @kbd{C-p}, and digits continue to work as usual, but they
+do the highlighting in the buffer showing the possible characters,
+rather than in the echo area.
+
+  In Japanese input methods, first you input a whole word using
+phonetic spelling; then, after the word is in the buffer, Emacs
+converts it into one or more characters using a large dictionary.  One
+phonetic spelling corresponds to a number of different Japanese words;
+to select one of them, use @kbd{C-n} and @kbd{C-p} to cycle through
 the alternatives.
 
   Sometimes it is useful to cut off input method processing so that the
@@ -405,7 +409,7 @@ characters.  For example, in input method @code{latin-1-postfix}, the
 sequence @kbd{e '} combines to form an @samp{e} with an accent.  What if
 you want to enter them as separate characters?
 
-  One way is to type the accent twice; that is a special feature for
+  One way is to type the accent twice; this is a special feature for
 entering the separate letter and accent.  For example, @kbd{e ' '} gives
 you the two characters @samp{e'}.  Another way is to type another letter
 after the @kbd{e}---something that won't combine with that---and
@@ -427,12 +431,13 @@ searching for what you have already entered.
 @vindex input-method-verbose-flag
 @vindex input-method-highlight-flag
   The variables @code{input-method-highlight-flag} and
-@code{input-method-verbose-flag} control how input methods explain what
-is happening.  If @code{input-method-highlight-flag} is non-@code{nil},
-the partial sequence is highlighted in the buffer.  If
-@code{input-method-verbose-flag} is non-@code{nil}, the list of possible
-characters to type next is displayed in the echo area (but not when you
-are in the minibuffer).
+@code{input-method-verbose-flag} control how input methods explain
+what is happening.  If @code{input-method-highlight-flag} is
+non-@code{nil}, the partial sequence is highlighted in the buffer (for
+most input methods---some disable this feature).  If
+@code{input-method-verbose-flag} is non-@code{nil}, the list of
+possible characters to type next is displayed in the echo area (but
+not when you are in the minibuffer).
 
 @cindex Leim package
   Input methods are implemented in the separate Leim package: they are
@@ -469,10 +474,10 @@ Display a list of all the supported input methods.
 @kindex C-x RET C-\
   To choose an input method for the current buffer, use @kbd{C-x
 @key{RET} C-\} (@code{set-input-method}).  This command reads the
-input method name with the minibuffer; the name normally starts with the
+input method name from the minibuffer; the name normally starts with the
 language environment that it is meant to be used with.  The variable
 @code{current-input-method} records which input method is selected.
-  
+
 @findex toggle-input-method
 @kindex C-\
   Input methods use various sequences of ASCII characters to stand for
@@ -500,7 +505,7 @@ select it in the current buffer by typing @kbd{C-\}.  The variable
 methods, you might want to use an input method different from the
 default chosen by @code{set-language-environment}.  You can instruct
 Emacs to select a different default input method for a certain
-language environment if you by using
+language environment, if you wish, by using
 @code{set-language-environment-hook} (@pxref{Language Environments,
 set-language-environment-hook}).  For example:
 
@@ -605,7 +610,7 @@ Display a list of all the supported coding systems.
 @findex describe-coding-system
   The command @kbd{C-h C} (@code{describe-coding-system}) displays
 information about particular coding systems.  You can specify a coding
-system name as argument; alternatively, with an empty argument, it
+system name as the argument; alternatively, with an empty argument, it
 describes the coding systems currently selected for various purposes,
 both in the current buffer and as the defaults, and the priority list
 for recognizing coding systems (@pxref{Recognize Coding}).
@@ -709,17 +714,17 @@ Czech, you probably want Latin-2 to be preferred.  This is one of the
 reasons to specify a language environment.
 
 @findex prefer-coding-system
-  However, you can alter the priority list in detail with the command
-@kbd{M-x prefer-coding-system}.  This command reads the name of a coding
-system from the minibuffer, and adds it to the front of the priority
-list, so that it is preferred to all others.  If you use this command
-several times, each use adds one element to the front of the priority
-list.
+  However, you can alter the coding system priority list in detail
+with the command @kbd{M-x prefer-coding-system}.  This command reads
+the name of a coding system from the minibuffer, and adds it to the
+front of the priority list, so that it is preferred to all others.  If
+you use this command several times, each use adds one element to the
+front of the priority list.
 
   If you use a coding system that specifies the end-of-line conversion
-type, such as @code{iso-8859-1-dos}, what that means is that Emacs
+type, such as @code{iso-8859-1-dos}, what this means is that Emacs
 should attempt to recognize @code{iso-8859-1} with priority, and should
-use DOS end-of-line conversion in case it recognizes @code{iso-8859-1}.
+use DOS end-of-line conversion when it does recognize @code{iso-8859-1}.
 
 @vindex file-coding-system-alist
   Sometimes a file name indicates which coding system to use for the
@@ -769,42 +774,54 @@ the buffer.
   The default value of @code{inhibit-iso-escape-detection} is
 @code{nil}.  We recommend that you not change it permanently, only for
 one specific operation.  That's because many Emacs Lisp source files
-that contain non-ASCII characters are encoded in the coding system
-@code{iso-2022-7bit} in the Emacs distribution, and they won't be
+in the Emacs distribution contain non-ASCII characters encoded in the
+coding system @code{iso-2022-7bit}, and they won't be
 decoded correctly when you visit those files if you suppress the
 escape sequence detection.
 
 @vindex coding
   You can specify the coding system for a particular file using the
-@samp{-*-@dots{}-*-} construct at the beginning of a file, 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,
-it 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.  If you specify the coding explicitly
-in the file, that overrides @code{file-coding-system-alist}.
+@w{@samp{-*-@dots{}-*-}} construct at the beginning of a file, 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}.
 
 @vindex auto-coding-alist
 @vindex auto-coding-regexp-alist
-  The variables @code{auto-coding-alist} and
-@code{auto-coding-regexp-alist} 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 Emacs
+@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.
+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.
 
   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} c @var{coding-system} @key{RET} M-x revert-buffer
-@key{RET}}.  To see what coding system did Emacs use 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}}.
+@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}}.
+
+@findex unify-8859-on-decoding-mode
+  The command @code{unify-8859-on-decoding-mode} enables a mode that
+``unifies'' the Latin alphabets when decoding text.  This works by
+converting all non-ASCII Latin-@var{n} characters to either Latin-1 or
+Unicode characters.  This way it is easier to use various
+Latin-@var{n} alphabets together.  In a future Emacs version we hope
+to move towards full Unicode support and complete unification of
+character sets.
 
 @vindex buffer-file-coding-system
   Once Emacs has chosen a coding system for a buffer, it stores that
@@ -818,14 +835,14 @@ Coding}).
 
   You can insert any possible character into any Emacs buffer, but
 most coding systems can only handle some of the possible characters.
-This means that you can insert characters that cannot be encoded with
-the coding system that will be used to save the buffer.  For example,
-you could start with an ASCII file and insert a few Latin-1 characters
-into it, or you could edit a text file in Polish encoded in
-@code{iso-8859-2} and add to it translations of several Polish words
-into Russian.  When you save the buffer, Emacs cannot use the current
-value of @code{buffer-file-coding-system}, because the characters you
-added cannot be encoded by that coding system.
+This means that it is possible for you to insert characters that
+cannot be encoded with the coding system that will be used to save the
+buffer.  For example, you could start with an ASCII file and insert a
+few Latin-1 characters into it, or you could edit a text file in
+Polish encoded in @code{iso-8859-2} and add some Russian words to it.
+When you save the buffer, Emacs cannot use the current value of
+@code{buffer-file-coding-system}, because the characters you added
+cannot be encoded by that coding system.
 
   When that happens, Emacs tries the most-preferred coding system (set
 by @kbd{M-x prefer-coding-system} or @kbd{M-x
@@ -833,17 +850,17 @@ set-language-environment}), and if that coding system can safely
 encode all of the characters in the buffer, Emacs uses it, and stores
 its value in @code{buffer-file-coding-system}.  Otherwise, Emacs
 displays a list of coding systems suitable for encoding the buffer's
-contents, and asks to choose one of those coding systems.
+contents, and asks you to choose one of those coding systems.
 
   If you insert the unsuitable characters in a mail message, Emacs
 behaves a bit differently.  It additionally checks whether the
 most-preferred coding system is recommended for use in MIME messages;
-if it isn't, Emacs tells you that the most-preferred coding system is
+if not, Emacs tells you that the most-preferred coding system is
 not recommended and prompts you for another coding system.  This is so
 you won't inadvertently send a message encoded in a way that your
 recipient's mail software will have difficulty decoding.  (If you do
-want to use the most-preferred coding system, you can type its name to
-Emacs prompt anyway.)
+want to use the most-preferred coding system, you can still type its
+name in response to the question.)
 
 @vindex sendmail-coding-system
   When you send a message with Mail mode (@pxref{Sending Mail}), Emacs has
@@ -858,7 +875,7 @@ Emacs encodes outgoing mail using the Latin-1 coding system.
 
 @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
+automatically from the coding system it is written inas 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
@@ -879,8 +896,8 @@ system, you can use these commands to specify one:
 
 @table @kbd
 @item C-x @key{RET} f @var{coding} @key{RET}
-Use coding system @var{coding} for the visited file
-in the current buffer.
+Use coding system @var{coding} for saving or revisiting the visited
+file in the current buffer.
 
 @item C-x @key{RET} c @var{coding} @key{RET}
 Specify coding system @var{coding} for the immediately following
@@ -907,12 +924,14 @@ selection---the next one---to or from the window system.
 
 @kindex C-x RET f
 @findex set-buffer-file-coding-system
-  The command @kbd{C-x @key{RET} f} (@code{set-buffer-file-coding-system})
-specifies the file coding system for the current buffer---in other
-words, which coding system to use when saving or rereading the visited
-file.  You specify which coding system using the minibuffer.  Since this
-command applies to a file you have already visited, it affects only the
-way the file is saved.
+  The command @kbd{C-x @key{RET} f}
+(@code{set-buffer-file-coding-system}) sets the file coding system for
+the current buffer---in other words, it says which coding system to
+use when saving or reverting the visited file.  You specify which
+coding system using the minibuffer.  If you specify a coding system
+that cannot handle all of the characters in the buffer, Emacs warns
+you about the troublesome characters when you actually save the
+buffer.
 
 @kindex C-x RET c
 @findex universal-coding-system-argument
@@ -925,17 +944,19 @@ command}.
 
   So if the immediately following command is @kbd{C-x C-f}, for example,
 it reads the file using that coding system (and records the coding
-system for when the file is saved).  Or if the immediately following
+system for when you later save the file).  Or if the immediately following
 command is @kbd{C-x C-w}, it writes the file using that coding system.
-Other file commands affected by a specified coding system include
-@kbd{C-x C-i} and @kbd{C-x C-v}, as well as the other-window variants of
-@kbd{C-x C-f}.
+When you specify the coding system for saving in this way, instead
+of with @kbd{C-x @key{RET} f}, there is no warning if the buffer
+contains characters that the coding system cannot handle.
 
-  @kbd{C-x @key{RET} c} also affects commands that start subprocesses,
-including @kbd{M-x shell} (@pxref{Shell}).
+  Other file commands affected by a specified coding system include
+@kbd{C-x C-i} and @kbd{C-x C-v}, as well as the other-window variants
+of @kbd{C-x C-f}.  @kbd{C-x @key{RET} c} also affects commands that
+start subprocesses, including @kbd{M-x shell} (@pxref{Shell}).
 
-  However, if the immediately following command does not use the coding
-system, then @kbd{C-x @key{RET} c} ultimately has no effect.
+  If the immediately following command does not use the coding system,
+then @kbd{C-x @key{RET} c} ultimately has no effect.
 
   An easy way to visit a file with no conversion is with the @kbd{M-x
 find-file-literally} command.  @xref{Visiting}.
@@ -975,7 +996,19 @@ translation of keyboard input is useful for terminals with keys that
 send non-ASCII graphic characters---for example, some terminals designed
 for ISO Latin-1 or subsets of it.
 
-  By default, keyboard input is not translated at all.
+  By default, keyboard input is translated based on your system locale
+setting.  If your terminal does not really support the encoding
+implied by your locale (for example, if you find it inserts a
+non-ASCII character if you type @kbd{M-i}), you will need to set
+@code{keyboard-coding-system} to @code{nil} to turn off encoding.
+You can do this by putting
+
+@lisp
+(set-keyboard-coding-system nil)
+@end lisp
+
+@noindent
+in your @file{~/.emacs} file.
 
   There is a similarity between using a coding system translation for
 keyboard input, and using an input method: both define sequences of
@@ -1034,20 +1067,23 @@ name, or it may get an error.  If such a problem happens, use @kbd{C-x
 C-w} to specify a new file name for that buffer.
 
 @vindex locale-coding-system
+@cindex decoding non-ASCII keyboard input on X
   The variable @code{locale-coding-system} specifies a coding system
 to use when encoding and decoding system strings such as system error
-messages and @code{format-time-string} formats and time stamps.  You
-should choose a coding system that is compatible with the underlying
-system's text representation, which is normally specified by one of
-the environment variables @env{LC_ALL}, @env{LC_CTYPE}, and
-@env{LANG}.  (The first one whose value is nonempty is the one that
-determines the text representation.)
+messages and @code{format-time-string} formats and time stamps.  That
+coding system is also used for decoding non-ASCII keyboard input on X
+Window systems.  You should choose a coding system that is compatible
+with the underlying system's text representation, which is normally
+specified by one of the environment variables @env{LC_ALL},
+@env{LC_CTYPE}, and @env{LANG}.  (The first one, in the order
+specified above, whose value is nonempty is the one that determines
+the text representation.)
 
 @node Fontsets
 @section Fontsets
 @cindex fontsets
 
-  A font for X typically defines shapes for one alphabet or script.
+  A font for X typically defines shapes for a single alphabet or script.
 Therefore, displaying the entire range of scripts that Emacs supports
 requires a collection of many fonts.  In Emacs, such a collection is
 called a @dfn{fontset}.  A fontset is defined by a list of fonts, each
@@ -1067,7 +1103,7 @@ additional font support.}
 and the @dfn{startup fontset}.  The standard fontset is most likely to
 have fonts for a wide variety of non-ASCII characters; however, this is
 not the default for Emacs to use.  (By default, Emacs tries to find a
-font which has bold and italic variants.)  You can specify use of the
+font that has bold and italic variants.)  You can specify use of the
 standard fontset with the @samp{-fn} option, or with the @samp{Font} X
 resource (@pxref{Font X}).  For example,
 
@@ -1081,14 +1117,6 @@ specifies a font that does not exist on your system, then it cannot
 display that character properly.  It will display that character as an
 empty box instead.
 
-@vindex highlight-wrong-size-font
-  The fontset height and width are determined by the ASCII characters
-(that is, by the font used for ASCII characters in that fontset).  If
-another font in the fontset has a different height, or a different
-width, then characters assigned to that font are clipped to the
-fontset's size.  If @code{highlight-wrong-size-font} is non-@code{nil},
-a box is displayed around these wrong-size characters as well.
-
 @node Defining Fontsets
 @section Defining fontsets
 
@@ -1135,7 +1163,7 @@ window frame:
   With the X resource @samp{Emacs.Font}, you can specify a fontset name
 just like an actual font name.  But be careful not to specify a fontset
 name in a wildcard resource like @samp{Emacs*Font}---that wildcard
-specification applies to various other purposes, such as menus, and
+specification matches various other resources, such as for menus, and
 menus cannot handle fontsets.
 
   You can specify additional fontsets using X resources named
@@ -1170,7 +1198,8 @@ that describe the character set.  For the ASCII character font,
 collapses them into a single wildcard.  This is to prevent use of
 auto-scaled fonts.  Fonts made by scaling larger fonts are not usable
 for editing, and scaling a smaller font is not useful because it is
-better to use the smaller font in its own size, which Emacs does.
+better to use the smaller font in its own size, which is what Emacs
+does.
 
   Thus if @var{fontpattern} is this,
 
@@ -1218,9 +1247,9 @@ call this function explicitly to create a fontset.
 @node Undisplayable Characters
 @section Undisplayable Characters
 
-  Your terminal may be unable to display some non-@sc{ascii}
-characters.  Most non-windowing terminals can only use a single
-character set (use the variable @code{default-terminal-coding-system}
+  There may be a some non-ASCII characters that your terminal cannot
+display.  Most non-windowing terminals support just a single character
+set (use the variable @code{default-terminal-coding-system}
 (@pxref{Specify Coding}) to tell Emacs which one); characters which
 can't be encoded in that coding system are displayed as @samp{?} by
 default.
@@ -1230,15 +1259,15 @@ you may not have fonts installed for all of them; characters that have
 no font appear as a hollow box.
 
   If you use Latin-1 characters but your terminal can't display
-Latin-1, you can arrange to display mnemonic @sc{ascii} sequences
+Latin-1, you can arrange to display mnemonic ASCII sequences
 instead, e.g.@: @samp{"o} for o-umlaut.  Load the library
 @file{iso-ascii} to do this.
 
 @vindex latin1-display
   If your terminal can display Latin-1, you can display characters
 from other European character sets using a mixture of equivalent
-Latin-1 characters and @sc{ascii} mnemonics.  Use the Custom option
-@code{latin1-display} to enable this.  The mnemonic @sc{ascii}
+Latin-1 characters and ASCII mnemonics.  Use the Custom option
+@code{latin1-display} to enable this.  The mnemonic ASCII
 sequences mostly correspond to those of the prefix input methods.
 
 @node Single-Byte Character Support
@@ -1249,13 +1278,13 @@ sequences mostly correspond to those of the prefix input methods.
 @cindex ISO Latin character sets
 @cindex Unibyte operation
   The ISO 8859 Latin-@var{n} character sets define character codes in
-the range 160 to 255 to handle the accented letters and punctuation
-needed by various European languages (and some non-European ones).
-If you disable multibyte
-characters, Emacs can still handle @emph{one} of these character codes
-at a time.  To specify @emph{which} of these codes to use, invoke
-@kbd{M-x set-language-environment} and specify a suitable language
-environment such as @samp{Latin-@var{n}}.
+the range 0240 to 0377 octal (160 to 255 decimal) to handle the
+accented letters and punctuation needed by various European languages
+(and some non-European ones).  If you disable multibyte characters,
+Emacs can still handle @emph{one} of these character codes at a time.
+To specify @emph{which} of these codes to use, invoke @kbd{M-x
+set-language-environment} and specify a suitable language environment
+such as @samp{Latin-@var{n}}.
 
   For more information about unibyte operation, see @ref{Enabling
 Multibyte}.  Note particularly that you probably want to ensure that
@@ -1281,7 +1310,7 @@ them yet.
 
 @findex standard-display-8bit
 @cindex 8-bit display
-  Normally non-ISO-8859 characters (between characters 128 and 159
+  Normally non-ISO-8859 characters (decimal codes between 128 and 159
 inclusive) are displayed as octal escapes.  You can change this for
 non-standard ``extended'' versions of ISO-8859 character sets by using the
 function @code{standard-display-8bit} in the @code{disp-table} library.
@@ -1292,8 +1321,9 @@ characters:
 @itemize @bullet
 @cindex 8-bit input
 @item
-If your keyboard can generate character codes 128 and up, representing
-non-ASCII you can type those character codes directly.
+If your keyboard can generate character codes 128 (decimal) and up,
+representing non-ASCII characters, you can type those character codes
+directly.
 
 On a windowing terminal, you should not need to do anything special to
 use these keys; they should simply work.  On a text-only terminal, you
@@ -1336,9 +1366,41 @@ command names.
 @cindex ISO Accents mode
 @findex iso-accents-mode
 @cindex Latin-1, Latin-2 and Latin-3 input mode
-For Latin-1, Latin-2 and Latin-3, @kbd{M-x iso-accents-mode} installs
-a minor mode which works much like the @code{latin-1-prefix} input
-method does not depend on having the input methods installed.  This
+For Latin-1, Latin-2 and Latin-3, @kbd{M-x iso-accents-mode} enables
+a minor mode that works much like the @code{latin-1-prefix} input
+method, but does not depend on having the input methods installed.  This
 mode is buffer-local.  It can be customized for various languages with
 @kbd{M-x iso-accents-customize}.
 @end itemize
+
+@node Charsets
+@section Charsets
+@cindex charsets
+
+  Emacs groups all supported characters into disjoint @dfn{charsets}.
+Each character code belongs to one and only one charset.  For
+historical reasons, Emacs typically divides an 8-bit character code
+for an extended version of ASCII into two charsets: ASCII, which
+covers the codes 0 through 127, plus another charset which covers the
+``right-hand part'' (the codes 128 and up).  For instance, the
+characters of Latin-1 include the Emacs charset @code{ascii} plus the
+Emacs charset @code{latin-iso8859-1}.
+
+  Emacs characters belonging to different charsets may look the same,
+but they are still different characters.  For example, the letter
+@samp{o} with acute accent in charset @code{latin-iso8859-1}, used for
+Latin-1, is different from the letter @samp{o} with acute accent in
+charset @code{latin-iso8859-2}, used for Latin-2.
+
+@findex list-charset-chars
+@cindex characters in a certain charset
+@findex describe-character-set
+  There are two commands for obtaining information about Emacs
+charsets.  The command @kbd{M-x list-charset-chars} prompts for a name
+of a character set, and displays all the characters in that character
+set.  The command @kbd{M-x describe-character-set} prompts for a
+charset name and displays information about that charset, including
+its internal representation within Emacs.
+
+  To find out which charset a character in the buffer belongs to,
+put point before it and type @kbd{C-u C-x =}.