From e412a0a5c065c5978fa3d236d976a621e3a7bfeb Mon Sep 17 00:00:00 2001 From: MM <> Date: Mon, 22 Jul 2024 21:52:17 +0100 Subject: [PATCH] iconv() to stri_encode() --- NAMESPACE | 1 + R/read_gv100.R | 2 +- R/wiesbaden-package.R | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/NAMESPACE b/NAMESPACE index d6ebae2..776b375 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -27,6 +27,7 @@ importFrom(readr,read_file) importFrom(readr,read_fwf) importFrom(readr,read_lines) importFrom(stats,na.omit) +importFrom(stringi,stri_encode) importFrom(stringi,stri_trans_general) importFrom(stringr,str_detect) importFrom(stringr,str_replace_all) diff --git a/R/read_gv100.R b/R/read_gv100.R index 33768b4..89baaa8 100644 --- a/R/read_gv100.R +++ b/R/read_gv100.R @@ -90,7 +90,7 @@ read_gv100 <- function(file, stzrt, # accomodate Sorbian (Latin-1 can not). x <- read_lines(file=file, locale = locale(encoding = "UTF-8"), ...) - x <- iconv(x, from = "UTF-8", to = "ISO8859-2") + x <- stri_encode(x, from = "UTF-8", to = "ISO8859-2") d <- withCallingHandlers( read_fwf( diff --git a/R/wiesbaden-package.R b/R/wiesbaden-package.R index 27b6d64..43a7069 100644 --- a/R/wiesbaden-package.R +++ b/R/wiesbaden-package.R @@ -30,7 +30,7 @@ #' @importFrom keyring key_set_with_value key_list key_get #' @importFrom stringr str_detect str_split str_replace_all str_trim str_to_lower #' @importFrom readr read_csv read_csv2 read_fwf read_delim read_file read_lines locale cols col_character -#' @importFrom stringi stri_trans_general +#' @importFrom stringi stri_trans_general stri_encode #' @importFrom stats na.omit #' @importFrom utils read.csv2 #' @importFrom jsonlite fromJSON toJSON