From caa8d5e4861a3d581b90cca5341fc1b3affcb092 Mon Sep 17 00:00:00 2001 From: Vilmantas Gegzna Date: Sun, 15 Mar 2020 17:02:08 +0200 Subject: [PATCH] Add encoding = getOption("citr.encoding") to readLines() --- R/insert_citation.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/insert_citation.R b/R/insert_citation.R index 477d8e3..675e2ea 100644 --- a/R/insert_citation.R +++ b/R/insert_citation.R @@ -104,7 +104,7 @@ insert_citation <- function( stop("More than one parent document found. See getOption('citr.parent_documents').") } - parent_document <- readLines(parents_path[parents], warn = FALSE) + parent_document <- readLines(parents_path[parents], warn = FALSE, encoding = getOption("citr.encoding")) parent_yaml_delimiters <- grep("^(---|\\.\\.\\.)\\s*$", parent_document) yaml_bib_file <- get_bib_from_yaml(