RMarkdown: UTF-8 works with Knit button but not with render()
问题 I'm working in RMarkdown, trying to render a document that has some UTF-8 characters in it. When I push the "Knit" button in RStudio, everything works great. But when I use the render() function, the UTF-8 gets lost. Here's a short snippet of reproducible code: --- output: html_document --- Total nitrogen (µg/L) Water temperature (°C) Pushing the Knit button gives me the correct output, whether I view it in RStudio or in Chrome. But if I render the file with render(), I get: Total nitrogen