Skip to content

write_sav needs to coerce labels to UTF-8 #87

Closed

Description

An example:

v1 <- labelled(c(1,1,2,3), c(éè = 1, à = 2, ï  = 3))
v2 <- c("éè", "éè", "à", "ï")
v3 <- c("ee", "ee", "a", "i")
dt <- data_frame(v1, v2, v3)
attr(dt$v1, "label") <- "a làbèl wïth acèènts"
attr(dt$v2, "label") <- "a label with no accent"
write_sav(dt, "example.sav")

When opening the resulting file with SPSS, it appears that:

  • v2 and v3 are correct
  • the value labels of v1 are not correct (i.e. they are displayed as ??, ??, ?, ? by SPSS)
  • variable labels are correct
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions