When printing a word file with the print() command, umlauts (ä,ö,ü) are not being printed correctly into the word file.
My R Studio is setup to save scripts as UTF-8. I manually saved all files "encoded as UTF-8", after I find/replaced all umlauts with ae/oe/ue and back to ä/ö/ü again. The officer package is set to use UTF-8.
Is there another setting (maybe in R itself) that has to be checked for successfull endocing when printing into a docx file?
EDIT:
I found the solution: I was running the scripts with the source command, which doesn't have UTF-8 set as default. This prints the umlauts (officer, .doxc)
source("path/to/script.R", encoding = "UTF-8" )
This one doesnt:
source("path/to/script.R", sep = ""))