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

cover text to UTF-8 #80

Closed ThierryO closed 3 years ago

ThierryO commented 3 years ago

The cover.txt is malformatted on windows when using latin1 characters like ç. Covering to UTF-8 might fix the problem.

ok <- Encoding(cover_text) %in% c("UTF-8", "unknown")
cover_text[!ok] <- iconv(cover_text[!ok], from = head(Encoding(cover_text)[!ok], 1), to = "UTF-8")

https://github.com/inbo/INBOmd/blob/1ec1bd489781507a3841311731e32eb2b223ae92/R/cover_info.R#L43

ElsLommelen commented 3 years ago

Oups, after developing code to solve this problem, I noticed this cover.txt was only malformatted when opening it in my RStudio, not when opening it in Kladblok or Notepad++ (and the code doesn't solve the RStudio encoding problem...) So I guess this issue can be closed.

ThierryO commented 3 years ago

Thanks for looking into this issue.