I am extracting lines from a pdf, and trying to detect a specific string with dplyr::filter(stringr::str_detect(my_column, 'my string')).
The string does not seem to have an encoding that is detectable.
Here is a link to the PDF file: https://bioconductor.org/packages/release/bioc/vignettes/Rsubread/inst/doc/SubreadUsersGuide.pdf
The string is the em-dash in the table (left hand column) on page 42.
I have tried detecting several representations of the em-dash, but cannot find the one in this document.
How can I determine the encoding of this em-dash so that I can filter my tibble with it?
pdftools::pdf_text("SubreadUsersGuide.pdf") %>%
stringr::str_split(pattern = '\r') %>%
tibble::tibble(
line = .
) %>%
tidyr::unnest(cols = line) %>%
dplyr::filter(
stringr::str_detect(line, pattern = '^EM_DASH')
)