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

Dan Gudmundsson dgud@REDACTED
Sat Mar 21 15:25:23 CET 2015


It does for latin1, i.e. it can convert latin1 chars to utf8|utf16|utf32
encoding on file and vice verse.

That is no change from what file:read and write do.
And the doc is the same for read_line as for read.

Anything above 256 gives badarg no_translation.

I left 'pread' as it is, it doesn't do any conversion today, i.e. ignores
encoding. I don't know if it is a bug or intentionally ignored since it is
strange to jump around at byte lengths when content is not byte oriented?


On Sat, Mar 21, 2015 at 1:38 PM, Anthony Ramine <n.oxyde@REDACTED> wrote:

> Le 16 mars 2015 à 08:22, Dan Gudmundsson <dgud@REDACTED> a écrit :
>
> >
> https://github.com/erlang/otp/commit/7efa93c9dd4ce25c5754c1b72ec804e8172c0099
>
> So in the end, the file module too supports unicode reading?
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20150321/7063e806/attachment.htm>


More information about the erlang-bugs mailing list