Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow read_lines to gracefully skip null values #338

Closed
nathanielng opened this issue Dec 23, 2015 · 3 comments
Closed

Allow read_lines to gracefully skip null values #338

nathanielng opened this issue Dec 23, 2015 · 3 comments
Assignees
Labels

Comments

@nathanielng
Copy link

@nathanielng nathanielng commented Dec 23, 2015

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?

@hadley
Copy link
Member

@hadley hadley commented Jun 2, 2016

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

@hadley hadley changed the title skipNul=TRUE option for readr::read_lines() Allow read_lines to gracefully skip null values Jun 2, 2016
@nathanielng
Copy link
Author

@nathanielng nathanielng commented Jun 2, 2016

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.

@hadley
Copy link
Member

@hadley hadley commented Jul 6, 2016

Can copy what CollectorCharacter::setValue() does

jimhester added a commit to jimhester/readr that referenced this issue Jul 8, 2016
It looks like the signature of the Token constructor changed, but the
calls in TokenizerLine were not properly updated for the change. It
wasn't causing a compilation error because the hasNull boolean was being
implicitly coerced to an integer, and the 0 was being coerced to a
boolean, (very bad!).

Fixes tidyverse#338
@lock lock bot locked and limited conversation to collaborators Sep 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants