title: Saving a plot using Hebrew (or UTF-8) encoding for text in pdf/svg devices in R?
body: <p>I would like to save a plot where the text (for example, in the title) is using Hebrew.  Trying the following won't work:</p>
  
  <pre><code>pdf("temp.pdf")
  plot(1, main = "שלום")
  dev.off()
  
  svg("temp.svg")
  plot(1, main = "שלום")
  dev.off()
  </code></pre>
  
  <p>Although using:</p>
  
  <pre><code>png("temp.png")
  plot(1, main = "שלום")
  dev.off()
  </code></pre>
  
  <p>Will give the correct output.</p>
  
  <p>Is there a way to fix it for pdf and svg as well?</p>
  
  <p>Thanks.</p>