[erlang-bugs] Misleading docs or implementation of file:read/2 and friends

Dan Gudmundsson dgud@REDACTED
Fri Mar 13 06:51:35 CET 2015


This should be fixed on master now.

/Dan

On Thu, Mar 12, 2015 at 11:33 PM, Anthony Ramine <n.oxyde@REDACTED> wrote:

> Le 3 mars 2015 à 17:15, Dan Gudmundsson <dgud@REDACTED> 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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20150313/2a3b2a53/attachment.htm>


More information about the erlang-bugs mailing list