Skip to content

BUG: read_stata ignoring encoding? #4626

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

Closed
jseabold opened this issue Aug 21, 2013 · 0 comments · Fixed by #4643
Closed

BUG: read_stata ignoring encoding? #4626

jseabold opened this issue Aug 21, 2013 · 0 comments · Fixed by #4643
Labels
Bug IO Data IO issues that don't fit into a more specific label
Milestone

Comments

@jseabold
Copy link
Contributor

I don't have time to debug right now, and maybe my expectations are just off, but it looks like read_stata doesn't respect the encoding keyword. I'm also not sure it's needed. AFAIK, Stata doesn't (and likely won't) support unicode. It always uses latin-1, so we can always use the latin-1 encoding for strings (maybe not desirable though).

https://www.dropbox.com/s/hq42trq4327ker8/encoding_issue.dta

dta = pd.read_stata("./encoding_issue.dta")
dta.head()

dta = pd.read_stata("./encoding_issue.dta", encoding="latin-1")
dta.head()

dta = pd.read_stata("./encoding_issue.dta")
dta.kreis1849.str.decode("latin-1")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug IO Data IO issues that don't fit into a more specific label
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant