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

wish: encoding parameter for read_sas() #176

Closed
reikoch opened this Issue Jun 7, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@reikoch
Copy link

reikoch commented Jun 7, 2016

sas7bdat files can report an incorrect encoding. In this case it would be helpful if one could overrule the stated encoding by a parameter like:

read_sas('xy.sas7bdat', encoding = 'ISO-8859-15')

Old sas7bdat files do not store their encoding at all. ReadStat's readstat_sas.c defines SAS_DEFAULT_STRING_ENCODING to resolve to WINDOWS-1252 in these cases. It would be great if from R one could overrule this setting either by another parameter to read_sas() or (better I think) by an option "defaultSASencoding" or so.

An example dataset with Shift-JIS content but no encoding specified you find in https://github.com/reikoch/testfiles/blob/master/tt.sas7bdat

@hadley hadley closed this in bcef36f Jun 9, 2016

@hadley hadley removed the ready label Jun 9, 2016

@reikoch

This comment has been minimized.

Copy link

reikoch commented Jun 9, 2016

Works! Thanks a lot Hadley!

@lock lock bot locked and limited conversation to collaborators Jun 27, 2018

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