diff options
author | Richard M. Stallman <rms@gnu.org> | 2004-02-17 01:04:35 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 2004-02-17 01:04:35 +0000 |
commit | a3d3f60db6255aecb481b0b9b2ab1da8f53eb6c1 (patch) | |
tree | db95d43bf4e8330481179830892e3568f4a09b81 /lispref/nonascii.texi | |
parent | cf11ad960ac195229f4a209185929973072d5040 (diff) | |
download | emacs-a3d3f60db6255aecb481b0b9b2ab1da8f53eb6c1.tar.gz |
(Translation of Characters): Give examples of use.
Explain about translation-table-for-input and
set-buffer-file-coding-system.
Minor typo fix.
Diffstat (limited to 'lispref/nonascii.texi')
-rw-r--r-- | lispref/nonascii.texi | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lispref/nonascii.texi b/lispref/nonascii.texi index 419a23efae7..62bd28fd78b 100644 --- a/lispref/nonascii.texi +++ b/lispref/nonascii.texi @@ -17,7 +17,7 @@ characters and how they are stored in strings and buffers. * Selecting a Representation:: Treating a byte sequence as unibyte or multi. * Character Codes:: How unibyte and multibyte relate to codes of individual characters. -* Character Sets:: The space of possible characters codes +* Character Sets:: The space of possible character codes is divided into various character sets. * Chars and Bytes:: More information about multibyte encodings. * Splitting Characters:: Converting a character to its byte sequence. @@ -503,6 +503,14 @@ 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. + For instance, the coding-system @code{utf-8} has a translation table +that maps characters of various charsets (e.g., +@code{latin-iso8859-@var{x}}) into Unicode character sets. This way, +it can encode Latin-2 characters into UTF-8. Meanwhile, +@code{unify-8859-on-decoding-mode} operates by specifying +@code{standard-translation-table-for-decode} to translate +Latin-@var{x} characters into corresponding Unicode characters. + @defun make-translation-table &rest translations This function returns a translation table based on the argument @var{translations}. Each element of @var{translations} should be a @@ -558,6 +566,10 @@ coding systems that don't specify any other translation table. Self-inserting characters are translated through this translation table before they are inserted. This variable automatically becomes buffer-local when set. + +@code{set-buffer-file-coding-system} sets this variable so that your +keyboard input gets translated into the character sets that the buffer +is likely to contain. @end defvar @node Coding Systems @@ -1065,7 +1077,7 @@ of the right way to use the variable: @example ;; @r{Read the file with no character code conversion.} ;; @r{Assume @acronym{crlf} represents end-of-line.} -(let ((coding-system-for-write 'emacs-mule-dos)) +(let ((coding-system-for-read 'emacs-mule-dos)) (insert-file-contents filename)) @end example |