You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If an input channel is in text mode, it is supposed to convert CRLF line endings to LF on Windows. I didn't test the output channels, but they are supposed to convert LF to CRLF on Windows (not sure if that is implemented).
If I read a line using input_line(), the string ends with \r on Windows.
Expected behavior
I expect the translation to happen as documented in the OCaml docs. I believe this would only be the case for Nodejs backend.
Versions
OCaml 4.12, js_of_ocaml 3.11.0 (but I checked the code and it hasn't been fixed with v4).
The text was updated successfully, but these errors were encountered:
There doesn't seem to be any support for automatic CRLF translation in nodejs.
The behavior can be emulated in mlNodeFd easily I think. Feel free to give it a go.
It should be easier now that stdin/stout are no longer special
hhugo
changed the title
[BUG] input_line, input_char, etc externals don't translate CRLF on Windows
[FEATURE REQUEST] input_line, input_char, etc externals don't translate CRLF on Windows
Jul 11, 2022
Describe the bug
If an input channel is in text mode, it is supposed to convert CRLF line endings to LF on Windows. I didn't test the output channels, but they are supposed to convert LF to CRLF on Windows (not sure if that is implemented).
If I read a line using
input_line()
, the string ends with\r
on Windows.Expected behavior
I expect the translation to happen as documented in the OCaml docs. I believe this would only be the case for Nodejs backend.
Versions
OCaml 4.12, js_of_ocaml 3.11.0 (but I checked the code and it hasn't been fixed with v4).
The text was updated successfully, but these errors were encountered: