Re: Misleading docs or implementation of file:read/2 and friends

Anthony Ramine <[email protected]>
Newsgroups gmane.comp.lang.erlang.bugs
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.