Skip to content

Allow read_lines to gracefully skip null values #338

Closed

Description

@nathanielng

Unlike readLines(), readr::read_lines() doesn't have a skipNul=TRUE option. Hence it either chokes on null characters, or strings get truncated at the null character. Could a skipNul=TRUE option be implemented?

Activity

  1. hadley commented on Jun 2, 2016

    @hadley
    Member

    Is there some reason that even needs to be an option? Why shouldn't it always do so?

  2. changed the title [-]skipNul=TRUE option for readr::read_lines()[/-] [+]Allow read_lines to gracefully skip null values[/+] on Jun 2, 2016
  3. nathanielng commented on Jun 2, 2016

    @nathanielng
    Author

    Come to think of it, I don't really see any need to be an option (even for backward compatibility). Perhaps Nuls should always be skipped, i.e. skipNul=TRUE always and skipNul=FALSE isn't allowed.

  4. hadley commented on Jul 6, 2016

    @hadley
    Member

    Can copy what CollectorCharacter::setValue() does

  5. locked and limited conversation to collaborators on Sep 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

featurea feature request or enhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions