Re: Misleading docs or implementation of file:read/2 and friends
Dan Gudmundsson <[email protected]>
| Newsgroups | gmane.comp.lang.erlang.bugs |
|---|---|
| Message-ID | <CANX4uuNvKFHGg7te8e=Y7s2fBaCT7Geh-2V0gbv9i4qUdzkUuA@mail.gmail.com> |
This should be fixed on master now. /Dan On Thu, Mar 12, 2015 at 11:33 PM, Anthony Ramine <[email protected]> wrote: > Le 3 mars 2015 à 17:15, Dan Gudmundsson <[email protected]> a écrit : > > > I took at file:read_line issue, and thought about it :-) > > > > IMHO it should behave as file:read/2 does and how it is documented. > > i.e. return {error, {no_translation, unicode, latin1}} for both binary > and list mode > > when encoding is set to unicode and reading non latin1 code points. > > (Which is confusing but that is how it is intended/documented, > > use io module for translating non latin1 codepoints). > > The problem is that file uses io in read/2 itself, calling io:request/2, > which ultimately invariably converts the response to Unicode. > > _______________________________________________ erlang-bugs mailing list [email protected] http://erlang.org/mailman/listinfo/erlang-bugs