Common Lisp Package: COM.INFORMATIMAGO.CLEXT.CHARACTER-SETS

This package exports functions to manage character-sets, character encodings, coding systems and external format. It's all the same, but everyone likes to have his own terms... Copyright Pascal J. Bourguignon 2005 - 2012 This package is provided under the GNU General Public Licence. See the source file for details.

README:

FUNCTION

Public

CHARACTER-SET-FOR-LISP-ENCODING (ENCODING)

ENCODING: An implementation specific object representing an encoding. possibly with line-termination. RETURN: The character-set that correspond to this emacs-encoding ; the line-termination.

CHARACTER-SET-FROM-EMACS-ENCODING (ECS)

ECS: A string or symbol naming the emacs encoding, possibly suffixed by a line-termination. RETURN: The character-set that correspond to this emacs-encoding ; the line-termination.

CHARACTER-SET-TO-EMACS-ENCODING (CS &KEY (LINE-TERMINATION UNIX))

RETURN: A string naming the emacs encoding for the given character-set and line-termination. SIGNAL: An error if line-termination is not (member :unix :mac :dos nil) or if cs has no emacs encoding.

CHARACTER-SET-TO-LISP-ENCODING (CS &KEY (LINE-TERMINATION UNIX))

RETURN: An implementation specific object representing the encoding for the given character-set and line-termination. SIGNAL: An error if line-termination is not (member :unix :mac :dos nil) or if cs has no emacs encoding.

EMACS-ENCODING-TO-LISP-EXTERNAL-FORMAT (EMACS-ENCODING)

RETURN: the external-format value corresponding to this EMACS-ENCODING.

Undocumented

EXTERNAL-FORMAT-CHARACTER-ENCODING (EXTERNAL-FORMAT)

EXTERNAL-FORMAT-LINE-TERMINATION (EXTERNAL-FORMAT)

Private

ADD-ALIASES-TO-GROUP (ENCODING-NAME-AND-ALIASES ALIASES)

ENCODING-NAME-AND-ALIASES: A list of name and aliases of character-sets. ALIASES: A list of lists of aliases, each sublist naming the same character-set. RETURN: A new list of name and aliases, with the ALIASES added, if they name the same character-set as ENCODING-NAME-AND-ALIASES.

FILL-CHARACTER-SET-EMACS-ENCODING

DO: Set the cs-emacs-encoding of the character-sets present in the current implementation.

FILL-CHARACTER-SET-LISP-ENCODING

DO: Set the cs-lisp-encoding of the character-sets present in the current implementation.

GENERIC-FUNCTION

Public

MAKE-EXTERNAL-FORMAT (CHARACTER-ENCODING &OPTIONAL LINE-TERMINATION)

Makes an implementation specific external-format.

VARIABLE

Private

*ALIASES*

A list of lists of aliases for character-set.

*EMACS-ENCODINGS*

List of emacs encoding, grouped by aliases

*LISP-ENCODINGS*

Give an a-list of name and list of aliases of encoding systems in the current Common Lisp implementation. Those names and aliases are strings.