-
Notifications
You must be signed in to change notification settings - Fork 70
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
Unable to convert string to the requested encoding when reading sav files with long strings #241
Comments
another observation is that a very similar file with only one character of difference (first variable name "aaaaa3" instead of "aaaaa2") does not raise the error, attached example file. |
Are UTF-8 strings being provided to the writer? |
Yes |
as mentioned in #260, it is possible to reproduce this error without any international character, (using only 'a's in this example) if the length of the string is at least 757. Another important thing to reproduce this is that the numerical values must be NANs. See #260 for C code to reproduce the issue. |
is this likely to be fixed? |
Hi,
When reading a sav file that contains a long string (756 characters to be precise, with 755 the error does not show up) with an international character, Readstat gives the error:
Attached an example save file. The sav file was produced with pyreadstat.
thanks in advance!
original report: Roche/pyreadstat#128
note: initially I reported the error was on writing, it is on reading!
eg.sav.zip
also attached a csv version of the file
eg.csv
The text was updated successfully, but these errors were encountered: