aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorEli Zaretskii2009-02-14 14:12:15 +0000
committerEli Zaretskii2009-02-14 14:12:15 +0000
commit77730170c0fb941193d3178acb0ffd53c4980140 (patch)
tree5709b3ab20c0cfa1401c2619a63118ac10d10657 /doc
parentaff01dd96f651db009a0d318a14477ff1f91e1c8 (diff)
downloademacs-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/ChangeLog7
-rw-r--r--doc/lispref/nonascii.texi11
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 @@
12009-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
12009-02-11 Glenn Morris <rgm@gnu.org> 82009-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
1190If the specified text includes raw bytes (@pxref{Text
1191Representations}), @code{select-safe-coding-system} suggests
1192@code{raw-text} for its encoding.
1193
1190If @var{default-coding-system} is non-@code{nil}, that is the first 1194If @var{default-coding-system} is non-@code{nil}, that is the first
1191coding system to try; if that can handle the text, 1195coding 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
1543buffer remains multibyte if it was multibyte before, and any 8-bit 1547buffer remains multibyte if it was multibyte before, and any 8-bit
1544bytes are converted to their multibyte representation (@pxref{Text 1548bytes are converted to their multibyte representation (@pxref{Text
1545Representations}). 1549Representations}).
1550
1551@cindex @code{undecided} coding-system, when encoding
1552Do @emph{not} use @code{undecided} for @var{coding-system} when
1553encoding text, since that may lead to unexpected results. Instead,
1554use @code{select-safe-coding-system} (@pxref{User-Chosen Coding
1555Systems, select-safe-coding-system}) to suggest a suitable encoding,
1556if 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