-
Notifications
You must be signed in to change notification settings - Fork 116
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
write_sav needs to coerce labels to UTF-8 #87
Comments
Do you have the same problems with the |
I just tried with write_spss. Exactly the same bug with accents in value labels. |
In the short-term, you can work around it by setting the |
Minimal reprex: # c("éè", "à", "ï")
labels_utf8 <- c("\u00e9\u00e8", "\u00e0", "\u00ef")
labels_latin1 <- iconv(labels_utf8, "utf-8", "latin1")
v_utf8 <- labelled(3:1, setNames(1:3, labels_utf8))
v_latin1 <- labelled(3:1, setNames(1:3, labels_latin1))
roundtrip_var(v_utf8) #ok
roundtrip_var(v_latin1) # not ok |
An example:
When opening the resulting file with SPSS, it appears that:
The text was updated successfully, but these errors were encountered: