diff options
author | Rickard Green <rickard@erlang.org> | 2023-05-12 13:16:43 +0200 |
---|---|---|
committer | Rickard Green <rickard@erlang.org> | 2023-05-12 14:24:37 +0200 |
commit | 510d036c4185523187a970789659601444591b4d (patch) | |
tree | 44a3f15441c896468f6bc120e06723aaa6785df4 | |
parent | b84b633e3e293bd8f174983b4bae4800d21a902f (diff) | |
download | erlang-510d036c4185523187a970789659601444591b4d.tar.gz |
[stdlib] doc fix
-rw-r--r-- | lib/stdlib/doc/src/io.xml | 29 |
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 > 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 > 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> |