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

BUG: read_stata ignoring encoding? #4626

Closed
jseabold opened this Issue Aug 21, 2013 · 0 comments

Comments

Projects
None yet
1 participant
@jseabold
Contributor

jseabold commented Aug 21, 2013

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