477 |
input method name from the minibuffer; the name normally starts with the |
input method name from the minibuffer; the name normally starts with the |
478 |
language environment that it is meant to be used with. The variable |
language environment that it is meant to be used with. The variable |
479 |
@code{current-input-method} records which input method is selected. |
@code{current-input-method} records which input method is selected. |
480 |
|
|
481 |
@findex toggle-input-method |
@findex toggle-input-method |
482 |
@kindex C-\ |
@kindex C-\ |
483 |
Input methods use various sequences of ASCII characters to stand for |
Input methods use various sequences of ASCII characters to stand for |
814 |
the file, look at the coding system mnemonic letter near the left edge |
the file, look at the coding system mnemonic letter near the left edge |
815 |
of the mode line (@pxref{Mode Line}), or type @kbd{C-h C @key{RET}}. |
of the mode line (@pxref{Mode Line}), or type @kbd{C-h C @key{RET}}. |
816 |
|
|
817 |
|
@findex unify-8859-on-decoding-mode |
818 |
|
The command @code{unify-8859-on-decoding-mode} enables a mode that |
819 |
|
``unifies'' the Latin alphabets when decoding text. This works by |
820 |
|
converting all non-ASCII Latin-@var{n} characters to either Latin-1 or |
821 |
|
Unicode characters. This way it is easier to use various |
822 |
|
Latin-@var{n} alphabets together. In a future Emacs version we hope |
823 |
|
to move towards full Unicode support and complete unification of |
824 |
|
character sets. |
825 |
|
|
826 |
@vindex buffer-file-coding-system |
@vindex buffer-file-coding-system |
827 |
Once Emacs has chosen a coding system for a buffer, it stores that |
Once Emacs has chosen a coding system for a buffer, it stores that |
828 |
coding system in @code{buffer-file-coding-system} and uses that coding |
coding system in @code{buffer-file-coding-system} and uses that coding |
896 |
|
|
897 |
@table @kbd |
@table @kbd |
898 |
@item C-x @key{RET} f @var{coding} @key{RET} |
@item C-x @key{RET} f @var{coding} @key{RET} |
899 |
Use coding system @var{coding} for the visited file |
Use coding system @var{coding} for saving or revisiting the visited |
900 |
in the current buffer. |
file in the current buffer. |
901 |
|
|
902 |
@item C-x @key{RET} c @var{coding} @key{RET} |
@item C-x @key{RET} c @var{coding} @key{RET} |
903 |
Specify coding system @var{coding} for the immediately following |
Specify coding system @var{coding} for the immediately following |
924 |
|
|
925 |
@kindex C-x RET f |
@kindex C-x RET f |
926 |
@findex set-buffer-file-coding-system |
@findex set-buffer-file-coding-system |
927 |
The command @kbd{C-x @key{RET} f} (@code{set-buffer-file-coding-system}) |
The command @kbd{C-x @key{RET} f} |
928 |
specifies the file coding system for the current buffer---in other |
(@code{set-buffer-file-coding-system}) sets the file coding system for |
929 |
words, which coding system to use when saving or rereading the visited |
the current buffer---in other words, it says which coding system to |
930 |
file. You specify which coding system using the minibuffer. Since this |
use when saving or reverting the visited file. You specify which |
931 |
command applies to a file you have already visited, it affects only the |
coding system using the minibuffer. If you specify a coding system |
932 |
way the file is saved. |
that cannot handle all of the characters in the buffer, Emacs warns |
933 |
|
you about the troublesome characters when you actually save the |
934 |
|
buffer. |
935 |
|
|
936 |
@kindex C-x RET c |
@kindex C-x RET c |
937 |
@findex universal-coding-system-argument |
@findex universal-coding-system-argument |
944 |
|
|
945 |
So if the immediately following command is @kbd{C-x C-f}, for example, |
So if the immediately following command is @kbd{C-x C-f}, for example, |
946 |
it reads the file using that coding system (and records the coding |
it reads the file using that coding system (and records the coding |
947 |
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 |
948 |
command is @kbd{C-x C-w}, it writes the file using that coding system. |
command is @kbd{C-x C-w}, it writes the file using that coding system. |
949 |
Other file commands affected by a specified coding system include |
When you specify the coding system for saving in this way, instead |
950 |
@kbd{C-x C-i} and @kbd{C-x C-v}, as well as the other-window variants of |
of with @kbd{C-x @key{RET} f}, there is no warning if the buffer |
951 |
@kbd{C-x C-f}. |
contains characters that the coding system cannot handle. |
952 |
|
|
953 |
|
Other file commands affected by a specified coding system include |
954 |
|
@kbd{C-x C-i} and @kbd{C-x C-v}, as well as the other-window variants |
955 |
|
of @kbd{C-x C-f}. @kbd{C-x @key{RET} c} also affects commands that |
956 |
|
start subprocesses, including @kbd{M-x shell} (@pxref{Shell}). |
957 |
|
|
958 |
@kbd{C-x @key{RET} c} also affects commands that start subprocesses, |
If the immediately following command does not use the coding system, |
959 |
including @kbd{M-x shell} (@pxref{Shell}). |
then @kbd{C-x @key{RET} c} ultimately has no effect. |
|
|
|
|
However, if the immediately following command does not use the coding |
|
|
system, then @kbd{C-x @key{RET} c} ultimately has no effect. |
|
960 |
|
|
961 |
An easy way to visit a file with no conversion is with the @kbd{M-x |
An easy way to visit a file with no conversion is with the @kbd{M-x |
962 |
find-file-literally} command. @xref{Visiting}. |
find-file-literally} command. @xref{Visiting}. |
996 |
send non-ASCII graphic characters---for example, some terminals designed |
send non-ASCII graphic characters---for example, some terminals designed |
997 |
for ISO Latin-1 or subsets of it. |
for ISO Latin-1 or subsets of it. |
998 |
|
|
999 |
By default, keyboard input is not translated at all. |
By default, keyboard input is translated based on your system locale |
1000 |
|
setting. If your terminal does not really support the encoding |
1001 |
|
implied by your locale (for example, if you find it inserts a |
1002 |
|
non-ASCII character if you type @kbd{M-i}), you will need to set |
1003 |
|
@code{keyboard-coding-system} to @code{nil} to turn off encoding. |
1004 |
|
You can do this by putting |
1005 |
|
|
1006 |
|
@lisp |
1007 |
|
(set-keyboard-coding-system nil) |
1008 |
|
@end lisp |
1009 |
|
|
1010 |
|
@noindent |
1011 |
|
in your @file{~/.emacs} file. |
1012 |
|
|
1013 |
There is a similarity between using a coding system translation for |
There is a similarity between using a coding system translation for |
1014 |
keyboard input, and using an input method: both define sequences of |
keyboard input, and using an input method: both define sequences of |