I'm reading html nodes from this site to make a tex file out of it. But because there are many names and places from different countries I have a problem with encoding. I've tried using UTF-8 encoding but it does not seem to support every language. Maybe there's a function in R which can translate "ż" to "z" and every other character. I don't really need them to be the way they are, but because of them I cannot compile my tex file. For example from "Eustachy Karol Żyliński" I received "Eustachy Karol Ĺ»yliĹ„ski". Also if the solution will be an different encoding could you also tell me which packages I should implement in the TeX file.
To read the html nodes I'm using
library(rvest)
matematyk=LinkWlasciwy[j] %>%
read_html() %>%
html_nodes(selektor1) %>%
html_text()
And to create output file I'm using:
write(sprintf("%s|%s|%s|%s\n",paste0(matematyk[1]),paste0(matematyk[2]),paste0(matematyk[3]),paste0(LinkWlasciwy[j])),file=nazwapliku1,append = TRUE)
It's all in a loop that saves every row of information from nodes h1 and h3 to file.