inbo / INBOmd

An R package with a collection of RMarkdown styles and templates. Elaborate examples are available at https://github.com/inbo/INBOmd_examples
https://inbo.github.io/INBOmd
GNU General Public License v3.0
11 stars 3 forks source link

encoding problem in v0.5.2 #89

Closed hansvancalster closed 1 year ago

hansvancalster commented 2 years ago

I had a INBOmd::gitbook() report which rendered in v0.5.1 but failed in v0.5.2. The problem is due to an ö character in the YAML title. I searched the diff of both versions for possible causes and the problem might have been introduced in 6694f99ad42c665b88208a44a1b91ac6b3efafe3 (the error that I get is from readLines()). I think changing

x <- readLines(output, encoding = "UTF-8")

to

x <- readLines(file(output, encoding = "UTF-8"))

might fix it - as suggested in https://github.com/viking/r-yaml/issues/38#issuecomment-314970933. You can reproduce the problem with inbo_examples repo, by changing the title in the example inbo_rapport.