You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that ReadStat is not converting the encoding of some metadata for Stata dta and SAS xpt files.
This came up in Roche/pyreadstat#298 because pyreadstat expects all text to be returned to it as utf-8 and errors when this is not the case. Tagging @ofajardo (pyreadstat maintainer).
Examples
Errors occur when reading notes from stata .dta files (#73) ("These data are a subset of those used in the study Caulkins, J.P. and R. Padman (1993), \x93Quantity Discounts and Quality Premia for Illicit Drugs\x94, Journal of the American Statistical Association, 88, 748-757"):
wgethttp://www.principlesofeconometrics.com/stata/cocaine.dta# errors because readstat returns notes as WINDOWS-1252 encoded textpython-c'import pyreadstat; pyreadstat.read_dta("cocaine.dta")'
Activity
Convert DTA notes to the output encoding