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

wish: encoding parameter for read_sas() #176

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

wish: encoding parameter for read_sas() #176

reikoch opened this issue Jun 7, 2016 · 1 comment
Labels

Comments

@reikoch
Copy link

@reikoch 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

@reikoch
Copy link
Author

@reikoch 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.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants