title: R Markdown file looses encoding information after being knit into HTML/PDF
body: <p>So far I was using combination of R + Rstudio + knit (to mostly HTML) in english so perhaps that's why I never stumbled on this issue. Recently, however, I started writing a doc in polish and noted that whether I knit to HTML or PDF, the text loses polish symbols. So in example the following sentence:</p>
  
  <pre><code>Warto podkreślić, że zaznaczona na osi wartość...
  </code></pre>
  
  <p>Is rendered as this:</p>
  
  <pre><code>Warto podkreslic, ze zaznaczona na osi wartosc...
  </code></pre>
  
  <p>And - just for your curiosity - in english it means:</p>
  
  <pre><code>Worth to point out, that the value marked on axis...
  </code></pre>
  
  <p>This is extremely troublesome. I checked that the original file is encoded in UTF-8 so correctly. I checked that all settings in Rstudio are set to utf-8 as well. Going through the call I'd also say it should work as UTF-8 so I'm puzzled what's wrong.</p>
  
  <p>Now as I'm writing this question, I tested that when I i.e. produce graph in R (graph is in ggplot2) without knitting the document, it also loses polish symbols. Perhaps the issue is with R itself and not a fault of knit then? Is it even possible to encode a doc in R properly or is it latin1 or nothing?</p>
  
  <p>I'm not sure what additional information I should provide to help you determine what's wrong. I'm running on Windows 10.</p>