I've inherited some R code to extract text from PDF documents. The code snippet below is edited for brevity. I'm new at R development and having difficulty finding detailed documentation of the functions I'm using.
library(pdftools)
in_path = commandArgs(trailingOnly=TRUE)
out_path <- file.path(out_directory, out_filename)
write(pdf_text(in_path), out_path)
The target system is RedHat Linux 6. This system is not connected to the internet and I cannot easily install any other packages.
How can I force utf-8 encoding in the output file?