diff --git a/R/lzstringr-package.R b/R/lzstringr-package.R index 9dd4d8e..63d9415 100644 --- a/R/lzstringr-package.R +++ b/R/lzstringr-package.R @@ -8,6 +8,7 @@ safe_compress <- function(string, f) { string <- iconv(string, from="UTF-8", to="UTF-16", toRaw=TRUE)[[1]] result <- f(string) chr_result <- rawToChar(as.raw(result)) + Encoding(chr_result) <- "UTF-8" chr_result }