Skip to content

The byLine operator is platform dependent and therefore a bit unreliable #35

Description

@flyaruu

I'm parsing a CSV file, and the byLine considers the whole file one long line.
The problem seems to be that the file lines use only CR line ends. (I don't know where that file came from)

The code looks like this:
public static Observable byLine(Observable source) {
return split(source, System.getProperty("line.separator"));
}

Using the system property for line separator isn't a very good idea, I think. It works when the file originates from the same platform, but it is a bit of a bugger to debug, and it can cause a 'works on my system' scenario.

I'd say just use the split and get rid of the byLine? Or add an explicit separator parameter (but then it is identical to split)

regards, Frank

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions