GNU Info

Info Node: (elisp)Lisp and Coding Systems

(elisp)Lisp and Coding Systems


Next: User-Chosen Coding Systems Prev: Encoding and I/O Up: Coding Systems
Enter node , (file) or (file)node

Coding Systems in Lisp
----------------------

   Here are the Lisp facilities for working with coding systems:

 - Function: coding-system-list &optional base-only
     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.

 - Function: coding-system-p object
     This function returns `t' if OBJECT is a coding system name.

 - Function: check-coding-system coding-system
     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'.

 - Function: coding-system-change-eol-conversion coding-system eol-type
     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 be `unix', `dos', `mac', or `nil'.  If it is
     `nil', the returned coding system determines the end-of-line
     conversion from the data.

 - Function: coding-system-change-text-conversion eol-coding text-coding
     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 returns `undecided', or one of its
     variants according to EOL-CODING.

 - Function: find-coding-systems-region from to
     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)'.

 - Function: find-coding-systems-string string
     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)'.

 - Function: find-coding-systems-for-charsets charsets
     This function returns a list of coding systems that could be used
     to encode all the character sets in the list CHARSETS.

 - Function: detect-coding-region start end &optional highest
     This function chooses a plausible coding system for decoding the
     text from START to END.  This text should be a byte sequence
     (Note: 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)'.

 - Function: detect-coding-string string highest
     This function is like `detect-coding-region' except that it
     operates on the contents of STRING instead of bytes in the buffer.

   Note: Process Information, for how to examine or set the coding
systems used for I/O to a subprocess.


automatically generated by info2www version 1.2.2.9