diff options
| author | Eli Zaretskii | 2009-02-14 14:12:15 +0000 |
|---|---|---|
| committer | Eli Zaretskii | 2009-02-14 14:12:15 +0000 |
| commit | 77730170c0fb941193d3178acb0ffd53c4980140 (patch) | |
| tree | 5709b3ab20c0cfa1401c2619a63118ac10d10657 /doc | |
| parent | aff01dd96f651db009a0d318a14477ff1f91e1c8 (diff) | |
| download | emacs-77730170c0fb941193d3178acb0ffd53c4980140.tar.gz emacs-77730170c0fb941193d3178acb0ffd53c4980140.zip | |
(User-Chosen Coding Systems): Document that select-safe-coding-system
suggests raw-text if there are raw bytes in the region.
(Explicit Encoding): Warn not to use `undecided' when encoding.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/lispref/ChangeLog | 7 | ||||
| -rw-r--r-- | doc/lispref/nonascii.texi | 11 |
2 files changed, 18 insertions, 0 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 3313a74158d..cfff6a23539 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2009-02-14 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * nonascii.texi (User-Chosen Coding Systems): Document that | ||
| 4 | select-safe-coding-system suggests raw-text if there are raw bytes | ||
| 5 | in the region. | ||
| 6 | (Explicit Encoding): Warn not to use `undecided' when encoding. | ||
| 7 | |||
| 1 | 2009-02-11 Glenn Morris <rgm@gnu.org> | 8 | 2009-02-11 Glenn Morris <rgm@gnu.org> |
| 2 | 9 | ||
| 3 | * frames.texi (Visibility of Frames): Mention the effect multiple | 10 | * frames.texi (Visibility of Frames): Mention the effect multiple |
diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index 7e4c767ad43..478a9eca060 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi | |||
| @@ -1187,6 +1187,10 @@ is the text in the current buffer between @var{from} and @var{to}. If | |||
| 1187 | @var{from} is a string, the string specifies the text to encode, and | 1187 | @var{from} is a string, the string specifies the text to encode, and |
| 1188 | @var{to} is ignored. | 1188 | @var{to} is ignored. |
| 1189 | 1189 | ||
| 1190 | If the specified text includes raw bytes (@pxref{Text | ||
| 1191 | Representations}), @code{select-safe-coding-system} suggests | ||
| 1192 | @code{raw-text} for its encoding. | ||
| 1193 | |||
| 1190 | If @var{default-coding-system} is non-@code{nil}, that is the first | 1194 | If @var{default-coding-system} is non-@code{nil}, that is the first |
| 1191 | coding system to try; if that can handle the text, | 1195 | coding system to try; if that can handle the text, |
| 1192 | @code{select-safe-coding-system} returns that coding system. It can | 1196 | @code{select-safe-coding-system} returns that coding system. It can |
| @@ -1543,6 +1547,13 @@ The result of encoding is logically a sequence of bytes, but the | |||
| 1543 | buffer remains multibyte if it was multibyte before, and any 8-bit | 1547 | buffer remains multibyte if it was multibyte before, and any 8-bit |
| 1544 | bytes are converted to their multibyte representation (@pxref{Text | 1548 | bytes are converted to their multibyte representation (@pxref{Text |
| 1545 | Representations}). | 1549 | Representations}). |
| 1550 | |||
| 1551 | @cindex @code{undecided} coding-system, when encoding | ||
| 1552 | Do @emph{not} use @code{undecided} for @var{coding-system} when | ||
| 1553 | encoding text, since that may lead to unexpected results. Instead, | ||
| 1554 | use @code{select-safe-coding-system} (@pxref{User-Chosen Coding | ||
| 1555 | Systems, select-safe-coding-system}) to suggest a suitable encoding, | ||
| 1556 | if there's no obvious pertinent value for @var{coding-system}. | ||
| 1546 | @end deffn | 1557 | @end deffn |
| 1547 | 1558 | ||
| 1548 | @defun encode-coding-string string coding-system &optional nocopy buffer | 1559 | @defun encode-coding-string string coding-system &optional nocopy buffer |