If you have time, why don't you give it a go at fixing this and submitting
a pull request?

Kevin

On Monday, March 10, 2014, Peter Simon <psimon0...@gmail.com> wrote:

> Just tried to grab the lines in a text file on Windows using Julia Version
> 0.3.0-prerelease+1570 with the following code:
>
> lines = open("test.cut","r") do fid
>    readchomp(fid)
> end
>
> lines came back to be a single string with embeded "\r\n" characters.  I
> had expected to get an array of strings without any trailing carriage
> returns/newlines.  Looking in the Julia source code I see that only '\n' is
> checked for.
>
> I work in an environment where we freely intermix Linux-style
> ('\n'-terminated) and Windows-style ("\r\n"-terminated) files.  Most of our
> other tools work transparently with either file type, without any explicit
> need for conversion.
>
> Are there any plans to make Julia's utility functions such as chomp(),
> readchomp(), etc., be able to handle these various line ending conventions?
>
> Thanks,
> --Peter
>

Reply via email to