Preserving french accents in RMarkdown knit

I want to preserve the French accents in my knit rmarkdown HTML- is there a way to specify language as such? -

title: "GW Analyses- Tchad, Secondary analyses"
author: "Grace Heymsfield"
date: "12/8/2021"
lang: fr
output: html_document

Cut and paste the example below and save it as fr.html. If it doesn't knit correctly use the RStudio menu File | Reopen with encoding and select UTF-8

---
title: "Les défenses vaccinales"
author: "Richard Careaga"
date: "12/9/2021"
output: html_document
---

```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```

Les premières données expérimentales, dont celles du pionnier des vaccins à ARN messager BioNTech, montrent que deux doses devraient être insuffisantes pour contrer l’infection. Les résultats sont plus encourageants avec trois doses.

What is not working exactly ? Do you have an example were you are loosing accents ?

File should be in UTF-8 and accents are supported.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.