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

read_sas failure for one (encoding issue?) #336

claudiaQB opened this issue Jan 11, 2018 · 2 comments

read_sas failure for one (encoding issue?) #336

claudiaQB opened this issue Jan 11, 2018 · 2 comments


Copy link

@claudiaQB claudiaQB commented Jan 11, 2018

First of all thank you for this great package to import SAS datasets into R.

I encountered an issue when reading this file (you will have to unzip it). This is the error:

> read_sas('grocencodingviet.sas7bdat')
Unsupported character set code: 68

Error in df_parse_sas_file(spec_data, spec_cat, encoding = encoding, cols_only = cols_only) : 
  Failed to parse grocencodingviet.sas7bdat: File has an unsupported character set.

I tried to set several encoding options but did not succeed to import it.

I can succesfully read it in SAS 9.3, with the following note:

NOTE: Data file EXP0.GROCENCODINGVIET.DATA is in a format that is native to another host, or the
file encoding does not match the session encoding. Cross Environment Data Access will be used,
which might require additional CPU resources and might reduce performance.


Please find below R session infos:

R version 3.3.2 (2016-10-31)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Debian GNU/Linux 8 (jessie)

[1] en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] haven_1.1.0 rj_2.0.5-2 

loaded via a namespace (and not attached):
 [1] readr_1.1.1   R6_2.2.2      magrittr_1.5  hms_0.3       tools_3.3.2  
 [6] rj.gd_2.0.0-1 tibble_1.3.3  Rcpp_0.12.9   forcats_0.2.0 rlang_0.1.1  

I tried with the latest github version (, commit ff69f3e) but it didn't solve the problem.

Thank you very much in advance for your help.

Copy link

@evanmiller evanmiller commented Jan 11, 2018

Thanks. Fixed in ReadStat with this commit: WizardMac/ReadStat@27cc43b

Copy link

@lock lock bot commented Jul 15, 2018

This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue.

@lock lock bot locked and limited conversation to collaborators Jul 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants