Skip to content

Commit

Permalink
Make sure that Iconv is applied to variable labels if required.
Browse files Browse the repository at this point in the history
  • Loading branch information
melff committed Jul 9, 2024
1 parent 2c53d1e commit cd04759
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/R/import-internal-spss-portable.R
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,9 @@ parseHeaderPorStream <- function(stream,iconv=FALSE,encoded=getOption("spss.por.
#print(variable)
# Can't rely on the information in the print formats, so always "real" 5.9.07
#types[variable$name] <- if(variable$width) 2 else 1#if (variable$printformat[3] > 0) 1 else 0
if(iconv){
variable$label <- iconv(variable$label,from=encoded)
}
types[variable$name] <- variable$width
dictionary[[variable$name]] <- variable[-nameidx]
}
Expand Down

0 comments on commit cd04759

Please sign in to comment.