Skip to content

Commit

Permalink
use xfun::read/write_utf8() instead
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Nov 27, 2018
1 parent 3090618 commit af999b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions R/rsos_article.R
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ rsos_article <- function(
post_processor <- function(
metadata, input_file, output_file, clean, verbose
) {
text <- readLines(output_file, warn = FALSE)
text <- xfun::read_utf8(output_file)

# set correct text in fmtext environment
end_first_page <- grep("^\\\\EndFirstPage", text) #nolint
Expand All @@ -84,7 +84,7 @@ rsos_article <- function(
text[(end_first_page + 1):length(text)]
)
}
writeLines(enc2utf8(text), output_file, useBytes = TRUE)
xfun::write_utf8(text, output_file)
output_file
}

Expand Down

0 comments on commit af999b4

Please sign in to comment.