Next: User-Chosen Coding Systems, Previous: Encoding and I/O, Up: Coding Systems
Here are the Lisp facilities for working with coding systems:
This function returns a list of all coding system names (symbols). If base-only is non-
nil
, the value includes only the base coding systems. Otherwise, it includes alias and variant coding systems as well.
This function checks the validity of coding-system. If that is valid, it returns coding-system. Otherwise it signals an error with condition
coding-system-error
.
This function returns a coding system which is like coding-system except for its eol conversion, which is specified by
eol-type
. eol-type should beunix
,dos
,mac
, ornil
. If it isnil
, the returned coding system determines the end-of-line conversion from the data.
This function returns a coding system which uses the end-of-line conversion of eol-coding, and the text conversion of text-coding. If text-coding is
nil
, it returnsundecided
, or one of its variants according to eol-coding.
This function returns a list of coding systems that could be used to encode a text between from and to. All coding systems in the list can safely encode any multibyte characters in that portion of the text.
If the text contains no multibyte characters, the function returns the list
(undecided)
.
This function returns a list of coding systems that could be used to encode the text of string. All coding systems in the list can safely encode any multibyte characters in string. If the text contains no multibyte characters, this returns the list
(undecided)
.
This function returns a list of coding systems that could be used to encode all the character sets in the list charsets.
This function chooses a plausible coding system for decoding the text from start to end. This text should be a byte sequence (see Explicit Encoding).
Normally this function returns a list of coding systems that could handle decoding the text that was scanned. They are listed in order of decreasing priority. But if highest is non-
nil
, then the return value is just one coding system, the one that is highest in priority.If the region contains only ascii characters, the value is
undecided
or(undecided)
.
This function is like
detect-coding-region
except that it operates on the contents of string instead of bytes in the buffer.
See Process Information, for how to examine or set the coding systems used for I/O to a subprocess.