summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRickard Green <rickard@erlang.org>2023-05-12 14:25:54 +0200
committerRickard Green <rickard@erlang.org>2023-05-12 14:25:54 +0200
commitd5184742c88dd62eca9dc89bf7241d84efba2b2a (patch)
tree44a3f15441c896468f6bc120e06723aaa6785df4
parentb84b633e3e293bd8f174983b4bae4800d21a902f (diff)
parent510d036c4185523187a970789659601444591b4d (diff)
downloaderlang-d5184742c88dd62eca9dc89bf7241d84efba2b2a.tar.gz
Merge branch 'rickard/26/doc-fix'
* rickard/26/doc-fix: [stdlib] doc fix
-rw-r--r--lib/stdlib/doc/src/io.xml29
1 files changed, 13 insertions, 16 deletions
diff --git a/lib/stdlib/doc/src/io.xml b/lib/stdlib/doc/src/io.xml
index 2a25163e3a..aed39279c9 100644
--- a/lib/stdlib/doc/src/io.xml
+++ b/lib/stdlib/doc/src/io.xml
@@ -1157,15 +1157,6 @@ enter><input>1.0er.</input>
<p>This option is supported by the standard shell
(<c>group.erl</c>), the 'oldshell' (<c>user.erl</c>), and the
file I/O servers.</p>
- <note>
- Since OTP 26 <c>user.erl</c> has been deprecated, all I/O is now passed
- through <c>group.erl</c>. I/O defaults to unicode if its supported, otherwise
- latin1 (0-127), all text is however converted to unicode as an intermediate
- representation. This means that 128-255 will be converted to unicode.
- If you have an escript that sends raw bytes on standard_io, those bytes
- will be translated to unicode and then back to latin1.
- To avoid this, set the encoding to latin1.
- </note>
</item>
<tag><c>{echo, boolean()}</c></tag>
<item>
@@ -1220,13 +1211,19 @@ fun("") -> {yes, "quit", []};
is in <c>{encoding, unicode}</c> mode if the I/O device supports
it. The mode can be changed, if the assumption of the runtime
system is wrong, by setting this option.</p>
- <p>The I/O device used when Erlang is started with the "-oldshell"
- or "-noshell" flags is by default set to <c>latin1</c> encoding,
- meaning that any characters &gt; codepoint 255 are escaped
- and that input is expected to be plain 8-bit ISO Latin-1.
- If the encoding is changed to Unicode, input and output from
- the standard file descriptors are in UTF-8 (regardless of
- operating system).</p>
+ <note><p>
+ Prior to OTP 26.0, when Erlang was started with the
+ <c>-oldshell</c> or <c>-noshell</c> flags (for example, in an
+ <c>escript</c>), the default encoding for <c>standard_io</c> was
+ set to <c>latin1</c>, meaning that any characters &gt; codepoint
+ 255 were escaped and that input was expected to be plain 8-bit
+ ISO Latin-1. As of OTP 26.0, <c>standard_io</c> always defaults
+ to <c>unicode</c> if its supported, otherwise <c>latin1</c>.
+ </p><p>
+ If you want to send raw bytes on <c>standard_io</c>, you now
+ always need to explicitly set the encoding to <c>latin1</c>;
+ otherwise, code points 128-255 will be converted to UTF-8.
+ </p></note>
<p>Files can also be set in <c>{encoding, unicode}</c>, meaning
that data is written and read as UTF-8. More encodings are
possible for files, see below.</p>