GNU Info

Info Node: (elisp)Translation of Characters

(elisp)Translation of Characters


Next: Coding Systems Prev: Scanning Charsets Up: Non-ASCII Characters
Enter node , (file) or (file)node

Translation of Characters
=========================

   A "translation table" specifies a mapping of characters into
characters.  These tables are used in encoding and decoding, and for
other purposes.  Some coding systems specify their own particular
translation tables; there are also default translation tables which
apply to all other coding systems.

 - Function: make-translation-table &rest translations
     This function returns a translation table based on the argument
     TRANSLATIONS.  Each element of TRANSLATIONS should be a list of
     elements of the form `(FROM . TO)'; this says to translate the
     character FROM into TO.

     The arguments and the forms in each argument are processed in
     order, and if a previous form already translates TO to some other
     character, say TO-ALT, FROM is also translated to TO-ALT.

     You can also map one whole character set into another character
     set with the same dimension.  To do this, you specify a generic
     character (which designates a character set) for FROM (Note:
     Splitting Characters).  In this case, TO should also be a
     generic character, for another character set of the same
     dimension.  Then the translation table translates each character
     of FROM's character set into the corresponding character of TO's
     character set.

   In decoding, the translation table's translations are applied to the
characters that result from ordinary decoding.  If a coding system has
property `character-translation-table-for-decode', that specifies the
translation table to use.  Otherwise, if
`standard-translation-table-for-decode' is non-`nil', decoding uses
that table.

   In encoding, the translation table's translations are applied to the
characters in the buffer, and the result of translation is actually
encoded.  If a coding system has property
`character-translation-table-for-encode', that specifies the
translation table to use.  Otherwise the variable
`standard-translation-table-for-encode' specifies the translation table.

 - Variable: standard-translation-table-for-decode
     This is the default translation table for decoding, for coding
     systems that don't specify any other translation table.

 - Variable: standard-translation-table-for-encode
     This is the default translation table for encoding, for coding
     systems that don't specify any other translation table.


automatically generated by info2www version 1.2.2.9