Commit 9e687da
authored
Fix
`IO.read/2` is the Unicode-safe reader and delegates an integer count
to `:io.get_chars/3`, which counts characters, not bytes. The docs were
copied from `IO.binread/2` (the byte-oriented, Unicode-unsafe reader),
so they incorrectly described the integer argument as a number of bytes
and carried binread/2's "preferred mode for reading non-textual inputs"
note. This also contradicted read/2's own return description, which
already documents the result as "the output characters".
Assisted-by: Claude Code:claude-opus-4-8
Signed-off-by: nseaSeb <nseaprotector@gmail.com>IO.read/2 docs: integer count is in characters, not bytes (#15549)1 parent 681a9ee commit 9e687da
1 file changed
Lines changed: 2 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
156 | | - | |
157 | | - | |
| 155 | + | |
| 156 | + | |
158 | 157 | | |
159 | 158 | | |
160 | 159 | | |
| |||
0 commit comments