annotate man/xemacs/mule.texi @ 786:381a409ad3c3

[xemacs-hg @ 2002-03-20 10:15:58 by ben] add japanese 0213 from mule-ucs
author ben
date Wed, 20 Mar 2002 10:15:59 +0000
parents b9f1a2e84ead
children 26f7cf2a4792
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
1 @c This is part of the Emacs manual.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
2 @c Copyright (C) 1997 Free Software Foundation, Inc.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
3 @c See file emacs.texi for copying conditions.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
4 @node Mule, Major Modes, Windows, Top
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
5 @chapter World Scripts Support
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
6 @cindex MULE
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
7 @cindex international scripts
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
8 @cindex multibyte characters
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
9 @cindex encoding of characters
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
10
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
11 @cindex Chinese
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
12 @cindex Greek
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
13 @cindex IPA
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
14 @cindex Japanese
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
15 @cindex Korean
600
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
16 @cindex Cyrillic
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
17 @cindex Russian
600
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
18 If you build XEmacs using the @code{--with-mule} option, it supports a
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
19 wide variety of world scripts, including the Latin script, the Arabic
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
20 script, Simplified Chinese (for mainland of China), Traditional Chinese
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
21 (for Taiwan and Hong-Kong), the Greek script, the Hebrew script, IPA
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
22 symbols, Japanese scripts (Hiragana, Katakana and Kanji), Korean scripts
600
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
23 (Hangul and Hanja) and the Cyrillic script (for Byelorussian, Bulgarian,
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
24 Russian, Serbian and Ukrainian). These features have been merged from
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
25 the modified version of Emacs known as MULE (for ``MULti-lingual
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
26 Enhancement to GNU Emacs'').
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
27
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
28 @menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
29 * Mule Intro:: Basic concepts of Mule.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
30 * Language Environments:: Setting things up for the language you use.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
31 * Input Methods:: Entering text characters not on your keyboard.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
32 * Select Input Method:: Specifying your choice of input methods.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
33 * Coding Systems:: Character set conversion when you read and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
34 write files, and so on.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
35 * Recognize Coding:: How XEmacs figures out which conversion to use.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
36 * Specify Coding:: Various ways to choose which conversion to use.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
37 @end menu
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
38
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
39 @node Mule Intro, Language Environments, Mule, Mule
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
40 @section Introduction to world scripts
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
41
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
42 The users of these scripts have established many more-or-less standard
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
43 coding systems for storing files.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
44 @c XEmacs internally uses a single multibyte character encoding, so that it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
45 @c can intermix characters from all these scripts in a single buffer or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
46 @c string. This encoding represents each non-ASCII character as a sequence
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
47 @c of bytes in the range 0200 through 0377.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
48 XEmacs translates between the internal character encoding and various
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
49 other coding systems when reading and writing files, when exchanging
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
50 data with subprocesses, and (in some cases) in the @kbd{C-q} command
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
51 (see below).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
52
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
53 @kindex C-h h
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
54 @findex view-hello-file
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
55 The command @kbd{C-h h} (@code{view-hello-file}) displays the file
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
56 @file{etc/HELLO}, which shows how to say ``hello'' in many languages.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
57 This illustrates various scripts.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
58
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
59 Keyboards, even in the countries where these character sets are used,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
60 generally don't have keys for all the characters in them. So XEmacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
61 supports various @dfn{input methods}, typically one for each script or
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
62 language, to make it convenient to type them.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
63
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
64 @kindex C-x RET
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
65 The prefix key @kbd{C-x @key{RET}} is used for commands that pertain
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
66 to world scripts, coding systems, and input methods.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
67
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
68
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
69 @node Language Environments, Input Methods, Mule Intro, Mule
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
70 @section Language Environments
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
71 @cindex language environments
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
72
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
73 All supported character sets are supported in XEmacs buffers if it is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
74 compile with mule; there is no need to select a particular language in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
75 order to display its characters in an XEmacs buffer. However, it is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
76 important to select a @dfn{language environment} in order to set various
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
77 defaults. The language environment really represents a choice of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
78 preferred script (more or less) rather that a choice of language.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
79
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
80 The language environment controls which coding systems to recognize
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
81 when reading text (@pxref{Recognize Coding}). This applies to files,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
82 incoming mail, netnews, and any other text you read into XEmacs. It may
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
83 also specify the default coding system to use when you create a file.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
84 Each language environment also specifies a default input method.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
85
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
86 @findex set-language-environment
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
87 The command to select a language environment is @kbd{M-x
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
88 set-language-environment}. It makes no difference which buffer is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
89 current when you use this command, because the effects apply globally to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
90 the XEmacs session. The supported language environments include:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
91
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
92 @quotation
600
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
93 ASCII, Chinese-BIG5, Chinese-GB, Croatian, Cyrillic-ALT, Cyrillic-ISO,
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
94 Cyrillic-KOI8, Cyrillic-Win, Czech, English, Ethiopic, French, German,
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
95 Greek, Hebrew, IPA, Japanese, Korean, Latin-1, Latin-2, Latin-3, Latin-4,
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
96 Latin-5, Norwegian, Polish, Romanian, Slovenian, Thai-XTIS, Vietnamese.
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
97 @end quotation
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
98
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
99 Some operating systems let you specify the language you are using by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
100 setting locale environment variables. XEmacs handles one common special
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
101 case of this: if your locale name for character types contains the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
102 string @samp{8859-@var{n}}, XEmacs automatically selects the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
103 corresponding language environment.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
104
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
105 @kindex C-h L
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
106 @findex describe-language-environment
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
107 To display information about the effects of a certain language
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
108 environment @var{lang-env}, use the command @kbd{C-h L @var{lang-env}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
109 @key{RET}} (@code{describe-language-environment}). This tells you which
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
110 languages this language environment is useful for, and lists the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
111 character sets, coding systems, and input methods that go with it. It
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
112 also shows some sample text to illustrate scripts used in this language
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
113 environment. By default, this command describes the chosen language
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
114 environment.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
115
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
116 @node Input Methods, Select Input Method, Language Environments, Mule
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
117 @section Input Methods
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
118
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
119 @cindex input methods
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
120 An @dfn{input method} is a kind of character conversion designed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
121 specifically for interactive input. In XEmacs, typically each language
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
122 has its own input method; sometimes several languages which use the same
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
123 characters can share one input method. A few languages support several
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
124 input methods.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
125
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
126 The simplest kind of input method works by mapping ASCII letters into
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
127 another alphabet. This is how the Greek and Russian input methods work.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
128
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
129 A more powerful technique is composition: converting sequences of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
130 characters into one letter. Many European input methods use composition
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
131 to produce a single non-ASCII letter from a sequence that consists of a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
132 letter followed by accent characters. For example, some methods convert
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
133 the sequence @kbd{'a} into a single accented letter.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
134
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
135 The input methods for syllabic scripts typically use mapping followed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
136 by composition. The input methods for Thai and Korean work this way.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
137 First, letters are mapped into symbols for particular sounds or tone
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
138 marks; then, sequences of these which make up a whole syllable are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
139 mapped into one syllable sign.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
140
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
141 Chinese and Japanese require more complex methods. In Chinese input
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
142 methods, first you enter the phonetic spelling of a Chinese word (in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
143 input method @code{chinese-py}, among others), or a sequence of portions
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
144 of the character (input methods @code{chinese-4corner} and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
145 @code{chinese-sw}, and others). Since one phonetic spelling typically
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
146 corresponds to many different Chinese characters, you must select one of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
147 the alternatives using special XEmacs commands. Keys such as @kbd{C-f},
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
148 @kbd{C-b}, @kbd{C-n}, @kbd{C-p}, and digits have special definitions in
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
149 this situation, used for selecting among the alternatives. @key{TAB}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
150 displays a buffer showing all the possibilities.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
151
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
152 In Japanese input methods, first you input a whole word using
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
153 phonetic spelling; then, after the word is in the buffer, XEmacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
154 converts it into one or more characters using a large dictionary. One
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
155 phonetic spelling corresponds to many differently written Japanese
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
156 words, so you must select one of them; use @kbd{C-n} and @kbd{C-p} to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
157 cycle through the alternatives.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
158
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
159 Sometimes it is useful to cut off input method processing so that the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
160 characters you have just entered will not combine with subsequent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
161 characters. For example, in input method @code{latin-1-postfix}, the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
162 sequence @kbd{e '} combines to form an @samp{e} with an accent. What if
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
163 you want to enter them as separate characters?
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
164
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
165 One way is to type the accent twice; that is a special feature for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
166 entering the separate letter and accent. For example, @kbd{e ' '} gives
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
167 you the two characters @samp{e'}. Another way is to type another letter
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
168 after the @kbd{e}---something that won't combine with that---and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
169 immediately delete it. For example, you could type @kbd{e e @key{DEL}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
170 '} to get separate @samp{e} and @samp{'}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
171
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
172 Another method, more general but not quite as easy to type, is to use
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
173 @kbd{C-\ C-\} between two characters to stop them from combining. This
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
174 is the command @kbd{C-\} (@code{toggle-input-method}) used twice.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
175 @ifinfo
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
176 @xref{Select Input Method}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
177 @end ifinfo
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
178
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
179 @kbd{C-\ C-\} is especially useful inside an incremental search,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
180 because stops waiting for more characters to combine, and starts
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
181 searching for what you have already entered.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
182
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
183 @vindex input-method-verbose-flag
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
184 @vindex input-method-highlight-flag
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
185 The variables @code{input-method-highlight-flag} and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
186 @code{input-method-verbose-flag} control how input methods explain what
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
187 is happening. If @code{input-method-highlight-flag} is non-@code{nil},
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
188 the partial sequence is highlighted in the buffer. If
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
189 @code{input-method-verbose-flag} is non-@code{nil}, the list of possible
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
190 characters to type next is displayed in the echo area (but not when you
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
191 are in the minibuffer).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
192
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
193 @node Select Input Method, Coding Systems, Input Methods, Mule
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
194 @section Selecting an Input Method
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
195
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
196 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
197 @item C-\
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
198 Enable or disable use of the selected input method.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
199
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
200 @item C-x @key{RET} C-\ @var{method} @key{RET}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
201 Select a new input method for the current buffer.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
202
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
203 @item C-h I @var{method} @key{RET}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
204 @itemx C-h C-\ @var{method} @key{RET}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
205 @findex describe-input-method
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
206 @kindex C-h I
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
207 @kindex C-h C-\
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
208 Describe the input method @var{method} (@code{describe-input-method}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
209 By default, it describes the current input method (if any).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
210
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
211 @item M-x list-input-methods
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
212 Display a list of all the supported input methods.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
213 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
214
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
215 @findex select-input-method
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
216 @vindex current-input-method
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
217 @kindex C-x RET C-\
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
218 To choose an input method for the current buffer, use @kbd{C-x
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
219 @key{RET} C-\} (@code{select-input-method}). This command reads the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
220 input method name with the minibuffer; the name normally starts with the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
221 language environment that it is meant to be used with. The variable
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
222 @code{current-input-method} records which input method is selected.
600
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
223
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
224 @findex toggle-input-method
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
225 @kindex C-\
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
226 Input methods use various sequences of ASCII characters to stand for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
227 non-ASCII characters. Sometimes it is useful to turn off the input
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
228 method temporarily. To do this, type @kbd{C-\}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
229 (@code{toggle-input-method}). To reenable the input method, type
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
230 @kbd{C-\} again.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
231
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
232 If you type @kbd{C-\} and you have not yet selected an input method,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
233 it prompts for you to specify one. This has the same effect as using
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
234 @kbd{C-x @key{RET} C-\} to specify an input method.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
235
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
236 @vindex default-input-method
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
237 Selecting a language environment specifies a default input method for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
238 use in various buffers. When you have a default input method, you can
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
239 select it in the current buffer by typing @kbd{C-\}. The variable
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
240 @code{default-input-method} specifies the default input method
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
241 (@code{nil} means there is none).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
242
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
243 @findex quail-set-keyboard-layout
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
244 Some input methods for alphabetic scripts work by (in effect)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
245 remapping the keyboard to emulate various keyboard layouts commonly used
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
246 for those scripts. How to do this remapping properly depends on your
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
247 actual keyboard layout. To specify which layout your keyboard has, use
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
248 the command @kbd{M-x quail-set-keyboard-layout}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
249
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
250 @findex list-input-methods
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
251 To display a list of all the supported input methods, type @kbd{M-x
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
252 list-input-methods}. The list gives information about each input
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
253 method, including the string that stands for it in the mode line.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
254
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
255 @node Coding Systems, Recognize Coding, Select Input Method, Mule
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
256 @section Coding Systems
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
257 @cindex coding systems
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
258
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
259 Users of various languages have established many more-or-less standard
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
260 coding systems for representing them. XEmacs does not use these coding
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
261 systems internally; instead, it converts from various coding systems to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
262 its own system when reading data, and converts the internal coding
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
263 system to other coding systems when writing data. Conversion is
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
264 possible in reading or writing files, in sending or receiving from the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
265 terminal, and in exchanging data with subprocesses.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
266
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
267 XEmacs assigns a name to each coding system. Most coding systems are
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
268 used for one language, and the name of the coding system starts with the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
269 language name. Some coding systems are used for several languages;
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
270 their names usually start with @samp{iso}. There are also special
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
271 coding systems @code{binary} and @code{no-conversion} which do not
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
272 convert printing characters at all.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
273
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
274 In addition to converting various representations of non-ASCII
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
275 characters, a coding system can perform end-of-line conversion. XEmacs
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
276 handles three different conventions for how to separate lines in a file:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
277 newline, carriage-return linefeed, and just carriage-return.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
278
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
279 @table @kbd
600
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
280 @item C-x @key{RET} C @var{coding} @key{RET}
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
281 Describe coding system @var{coding}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
282
600
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
283 @item C-x @key{RET} C @key{RET}
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
284 Describe the coding systems currently in use.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
285
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
286 @item M-x list-coding-systems
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
287 Display a list of all the supported coding systems.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
288
600
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
289 @item C-u M-x list-coding-systems
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
290 Display comprehensive list of specific details of all supported coding
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
291 systems.
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
292
602
b9f1a2e84ead [xemacs-hg @ 2001-06-01 08:17:05 by martinb]
martinb
parents: 600
diff changeset
293 @end table
b9f1a2e84ead [xemacs-hg @ 2001-06-01 08:17:05 by martinb]
martinb
parents: 600
diff changeset
294
600
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
295 @kindex C-x RET C
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
296 @findex describe-coding-system
600
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
297 The command @kbd{C-x RET C} (@code{describe-coding-system}) displays
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
298 information about particular coding systems. You can specify a coding
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
299 system name as argument; alternatively, with an empty argument, it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
300 describes the coding systems currently selected for various purposes,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
301 both in the current buffer and as the defaults, and the priority list
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
302 for recognizing coding systems (@pxref{Recognize Coding}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
303
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
304 @findex list-coding-systems
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
305 To display a list of all the supported coding systems, type @kbd{M-x
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
306 list-coding-systems}. The list gives information about each coding
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
307 system, including the letter that stands for it in the mode line
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
308 (@pxref{Mode Line}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
309
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
310 Each of the coding systems that appear in this list---except for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
311 @code{binary}, which means no conversion of any kind---specifies how and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
312 whether to convert printing characters, but leaves the choice of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
313 end-of-line conversion to be decided based on the contents of each file.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
314 For example, if the file appears to use carriage-return linefeed between
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
315 lines, that end-of-line conversion will be used.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
316
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
317 Each of the listed coding systems has three variants which specify
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
318 exactly what to do for end-of-line conversion:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
319
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
320 @table @code
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
321 @item @dots{}-unix
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
322 Don't do any end-of-line conversion; assume the file uses
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
323 newline to separate lines. (This is the convention normally used
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
324 on Unix and GNU systems.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
325
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
326 @item @dots{}-dos
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
327 Assume the file uses carriage-return linefeed to separate lines,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
328 and do the appropriate conversion. (This is the convention normally used
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
329 on Microsoft systems.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
330
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
331 @item @dots{}-mac
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
332 Assume the file uses carriage-return to separate lines, and do the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
333 appropriate conversion. (This is the convention normally used on the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
334 Macintosh system.)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
335 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
336
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
337 These variant coding systems are omitted from the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
338 @code{list-coding-systems} display for brevity, since they are entirely
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
339 predictable. For example, the coding system @code{iso-8859-1} has
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
340 variants @code{iso-8859-1-unix}, @code{iso-8859-1-dos} and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
341 @code{iso-8859-1-mac}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
342
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
343 In contrast, the coding system @code{binary} specifies no character
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
344 code conversion at all---none for non-Latin-1 byte values and none for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
345 end of line. This is useful for reading or writing binary files, tar
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
346 files, and other files that must be examined verbatim.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
347
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
348 The easiest way to edit a file with no conversion of any kind is with
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
349 the @kbd{M-x find-file-literally} command. This uses @code{binary}, and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
350 also suppresses other XEmacs features that might convert the file
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
351 contents before you see them. @xref{Visiting}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
352
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
353 The coding system @code{no-conversion} means that the file contains
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
354 non-Latin-1 characters stored with the internal XEmacs encoding. It
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
355 handles end-of-line conversion based on the data encountered, and has
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
356 the usual three variants to specify the kind of end-of-line conversion.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
357
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
358
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
359 @node Recognize Coding, Specify Coding, Coding Systems, Mule
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
360 @section Recognizing Coding Systems
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
361
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
362 Most of the time, XEmacs can recognize which coding system to use for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
363 any given file--once you have specified your preferences.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
364
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
365 Some coding systems can be recognized or distinguished by which byte
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
366 sequences appear in the data. However, there are coding systems that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
367 cannot be distinguished, not even potentially. For example, there is no
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
368 way to distinguish between Latin-1 and Latin-2; they use the same byte
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
369 values with different meanings.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
370
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
371 XEmacs handles this situation by means of a priority list of coding
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
372 systems. Whenever XEmacs reads a file, if you do not specify the coding
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
373 system to use, XEmacs checks the data against each coding system,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
374 starting with the first in priority and working down the list, until it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
375 finds a coding system that fits the data. Then it converts the file
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
376 contents assuming that they are represented in this coding system.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
377
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
378 The priority list of coding systems depends on the selected language
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
379 environment (@pxref{Language Environments}). For example, if you use
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
380 French, you probably want XEmacs to prefer Latin-1 to Latin-2; if you
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
381 use Czech, you probably want Latin-2 to be preferred. This is one of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
382 the reasons to specify a language environment.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
383
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
384 @findex prefer-coding-system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
385 However, you can alter the priority list in detail with the command
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
386 @kbd{M-x prefer-coding-system}. This command reads the name of a coding
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
387 system from the minibuffer, and adds it to the front of the priority
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
388 list, so that it is preferred to all others. If you use this command
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
389 several times, each use adds one element to the front of the priority
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
390 list.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
391
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
392 @vindex file-coding-system-alist
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
393 Sometimes a file name indicates which coding system to use for the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
394 file. The variable @code{file-coding-system-alist} specifies this
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
395 correspondence. There is a special function
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
396 @code{modify-coding-system-alist} for adding elements to this list. For
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
397 example, to read and write all @samp{.txt} using the coding system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
398 @code{china-iso-8bit}, you can execute this Lisp expression:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
399
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
400 @smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
401 (modify-coding-system-alist 'file "\\.txt\\'" 'china-iso-8bit)
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
402 @end smallexample
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
403
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
404 @noindent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
405 The first argument should be @code{file}, the second argument should be
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
406 a regular expression that determines which files this applies to, and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
407 the third argument says which coding system to use for these files.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
408
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
409 @vindex coding
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
410 You can specify the coding system for a particular file using the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
411 @samp{-*-@dots{}-*-} construct at the beginning of a file, or a local
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
412 variables list at the end (@pxref{File Variables}). You do this by
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
413 defining a value for the ``variable'' named @code{coding}. XEmacs does
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
414 not really have a variable @code{coding}; instead of setting a variable,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
415 it uses the specified coding system for the file. For example,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
416 @samp{-*-mode: C; coding: iso-8859-1;-*-} specifies use of the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
417 iso-8859-1 coding system, as well as C mode.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
418
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
419 @vindex buffer-file-coding-system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
420 Once XEmacs has chosen a coding system for a buffer, it stores that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
421 coding system in @code{buffer-file-coding-system} and uses that coding
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
422 system, by default, for operations that write from this buffer into a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
423 file. This includes the commands @code{save-buffer} and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
424 @code{write-region}. If you want to write files from this buffer using
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
425 a different coding system, you can specify a different coding system for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
426 the buffer using @code{set-buffer-file-coding-system} (@pxref{Specify
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
427 Coding}).
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
429
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
430 @node Specify Coding, , Recognize Coding, Mule
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
431 @section Specifying a Coding System
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
432
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
433 In cases where XEmacs does not automatically choose the right coding
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
434 system, you can use these commands to specify one:
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
435
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
436 @table @kbd
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
437 @item C-x @key{RET} f @var{coding} @key{RET}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
438 Use coding system @var{coding} for the visited file
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
439 in the current buffer.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
440
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
441 @item C-x @key{RET} c @var{coding} @key{RET}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
442 Specify coding system @var{coding} for the immediately following
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
443 command.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
444
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
445 @item C-x @key{RET} k @var{coding} @key{RET}
600
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
446 Use coding system @var{coding} for keyboard input. (This feature is
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
447 non-functional and is temporarily disabled.)
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
448
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
449 @item C-x @key{RET} t @var{coding} @key{RET}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
450 Use coding system @var{coding} for terminal output.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
451
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
452 @item C-x @key{RET} p @var{coding} @key{RET}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
453 Use coding system @var{coding} for subprocess input and output
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
454 in the current buffer.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
455 @end table
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
456
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
457 @kindex C-x RET f
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
458 @findex set-buffer-file-coding-system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
459 The command @kbd{C-x RET f} (@code{set-buffer-file-coding-system})
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
460 specifies the file coding system for the current buffer---in other
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
461 words, which coding system to use when saving or rereading the visited
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
462 file. You specify which coding system using the minibuffer. Since this
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
463 command applies to a file you have already visited, it affects only the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
464 way the file is saved.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
465
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
466 @kindex C-x RET c
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
467 @findex universal-coding-system-argument
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
468 Another way to specify the coding system for a file is when you visit
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
469 the file. First use the command @kbd{C-x @key{RET} c}
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
470 (@code{universal-coding-system-argument}); this command uses the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
471 minibuffer to read a coding system name. After you exit the minibuffer,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
472 the specified coding system is used for @emph{the immediately following
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
473 command}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
474
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
475 So if the immediately following command is @kbd{C-x C-f}, for example,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
476 it reads the file using that coding system (and records the coding
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
477 system for when the file is saved). Or if the immediately following
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
478 command is @kbd{C-x C-w}, it writes the file using that coding system.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
479 Other file commands affected by a specified coding system include
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
480 @kbd{C-x C-i} and @kbd{C-x C-v}, as well as the other-window variants of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
481 @kbd{C-x C-f}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
482
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
483 In addition, if you run some file input commands with the precedent
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
484 @kbd{C-u}, you can specify coding system to read from minibuffer. So if
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
485 the immediately following command is @kbd{C-x C-f}, for example, it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
486 reads the file using that coding system (and records the coding system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
487 for when the file is saved). Other file commands affected by a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
488 specified coding system include @kbd{C-x C-i} and @kbd{C-x C-v}, as well
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
489 as the other-window variants of @kbd{C-x C-f}.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
490
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
491 @vindex default-buffer-file-coding-system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
492 The variable @code{default-buffer-file-coding-system} specifies the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
493 choice of coding system to use when you create a new file. It applies
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
494 when you find a new file, and when you create a buffer and then save it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
495 in a file. Selecting a language environment typically sets this
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
496 variable to a good choice of default coding system for that language
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
497 environment.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
498
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
499 @kindex C-x RET t
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
500 @findex set-terminal-coding-system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
501 The command @kbd{C-x @key{RET} t} (@code{set-terminal-coding-system})
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
502 specifies the coding system for terminal output. If you specify a
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
503 character code for terminal output, all characters output to the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
504 terminal are translated into that coding system.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
505
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
506 This feature is useful for certain character-only terminals built to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
507 support specific languages or character sets---for example, European
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
508 terminals that support one of the ISO Latin character sets.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
509
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
510 By default, output to the terminal is not translated at all.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
511
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
512 @kindex C-x RET k
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
513 @findex set-keyboard-coding-system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
514 The command @kbd{C-x @key{RET} k} (@code{set-keyboard-coding-system})
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
515 specifies the coding system for keyboard input. Character-code
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
516 translation of keyboard input is useful for terminals with keys that
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
517 send non-ASCII graphic characters---for example, some terminals designed
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
518 for ISO Latin-1 or subsets of it.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
519
600
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
520 (This feature is non-functional and is temporarily disabled.)
a99eebfee7d3 [xemacs-hg @ 2001-06-01 07:15:24 by martinb]
martinb
parents: 442
diff changeset
521
428
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
522 By default, keyboard input is not translated at all.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
523
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
524 There is a similarity between using a coding system translation for
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
525 keyboard input, and using an input method: both define sequences of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
526 keyboard input that translate into single characters. However, input
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
527 methods are designed to be convenient for interactive use by humans, and
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
528 the sequences that are translated are typically sequences of ASCII
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
529 printing characters. Coding systems typically translate sequences of
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
530 non-graphic characters.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
531
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
532 @kindex C-x RET p
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
533 @findex set-buffer-process-coding-system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
534 The command @kbd{C-x @key{RET} p} (@code{set-buffer-process-coding-system})
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
535 specifies the coding system for input and output to a subprocess. This
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
536 command applies to the current buffer; normally, each subprocess has its
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
537 own buffer, and thus you can use this command to specify translation to
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
538 and from a particular subprocess by giving the command in the
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
539 corresponding buffer.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
540
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
541 By default, process input and output are not translated at all.
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
542
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
543 @vindex file-name-coding-system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
544 The variable @code{file-name-coding-system} specifies a coding system
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
545 to use for encoding file names. If you set the variable to a coding
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
546 system name (as a Lisp symbol or a string), XEmacs encodes file names
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
547 using that coding system for all file operations. This makes it
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
548 possible to use non-Latin-1 characters in file names---or, at least,
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
549 those non-Latin-1 characters which the specified coding system can
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
550 encode. By default, this variable is @code{nil}, which implies that you
3ecd8885ac67 Import from CVS: tag r21-2-22
cvs
parents:
diff changeset
551 cannot use non-Latin-1 characters in file names.