From 7e2f4f9625316d2f78f0f7e4cda5fe8ea34daeea Mon Sep 17 00:00:00 2001 From: AlreadyTakenJonas Date: Thu, 31 Aug 2023 15:43:49 +0200 Subject: [PATCH] fix #118 read.spc no longer fails and does its thing like the good ol times --- R/DEPRECATED-read.spc.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/DEPRECATED-read.spc.R b/R/DEPRECATED-read.spc.R index b49d6796..9c1118ff 100644 --- a/R/DEPRECATED-read.spc.R +++ b/R/DEPRECATED-read.spc.R @@ -552,7 +552,7 @@ raw.split.nul <- function(raw, trunc = c(TRUE, TRUE), firstonly = FALSE, paste.c } log.txt[log.txt == .nul] <- replace.nul log.txt <- readChar(log.txt, length(log.txt), useBytes = T) - log.txt <- gsub(rawToChar(replace.nul), "\r\n", log.txt) + log.txt <- gsub(rawToChar(replace.nul), "\r\n", log.txt, useBytes=TRUE) log.txt <- iconv(log.txt, iconv.from, iconv.to) log.txt <- split.string(log.txt, "\r\n") ## spc file spec says \r\n regardless of OS log.txt <- split.line(log.txt, "=")