[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The principal purpose of coding systems is for use in reading and
writing files. The function insert-file-contents
uses
a coding system for decoding the file data, and write-region
uses one to encode the buffer contents.
You can specify the coding system to use either explicitly
(see section 33.10.6 Specifying a Coding System for One Operation), or implicitly using the defaulting
mechanism (see section 33.10.5 Default Coding Systems). But these methods may not
completely specify what to do. For example, they may choose a coding
system such as undefined
which leaves the character code
conversion to be determined from the data. In these cases, the I/O
operation finishes the job of choosing a coding system. Very often
you will want to find out afterwards which coding system was chosen.
write-region
. When those operations ask the
user to specify a different coding system,
buffer-file-coding-system
is updated to the coding system
specified.
However, buffer-file-coding-system
does not affect sending text
to a subprocess.
buffer-file-coding-system
). Note that it is not used
for write-region
.
When a command to save the buffer starts out to use
buffer-file-coding-system
(or save-buffer-coding-system
),
and that coding system cannot handle
the actual text in the buffer, the command asks the user to choose
another coding system. After that happens, the command also updates
buffer-file-coding-system
to represent the coding system that the
user specified.
Warning: Since receiving subprocess output sets this variable, it can change whenever Emacs waits; therefore, you should copy the value shortly after the function call that stores the value you are interested in.
The variable selection-coding-system
specifies how to encode
selections for the window system. See section 29.18 Window System Selections.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |