title: Using German characters (ü, ö, ä, etc.) in text analysis (R)
body: <p>I'm doing some text mining in R. The text I want to analyse is in German.</p>
  
  <p>The problem is that German characters aren't displayed correctly either in the text itself or in the results.</p>
  
  <p>I'm working on Mac OS.</p>
  
  <p>I've found similar threads on here and tried out proposed solutions:</p>
  
  <pre><code>Sys.setlocale("LC_ALL", "de_DE.UTF-8")
  </code></pre>
  
  <p>seems to change the language (i.e. doesn't give an error message) but the characters are still displayed incorrectly, 
  e.g. <em>Erste-Hilfe-Ma\xa7nahmen</em> instead of <em>Erste-Hilfe-Maßnahmen</em>.</p>
  
  <pre><code>text &lt;- readLines("Erste Hilfe.txt", encoding="de_DE.UTF-8")
  </code></pre>
  
  <p>Result: <em>Erste-Hilfe-Ma\xa7nahmen</em></p>
  
  <pre><code>text &lt;- readLines("Erste Hilfe.txt", encoding="ISO/IEC 8859-15")
  </code></pre>
  
  <p>Result: <em>Erste-Hilfe-Ma\xa7nahmen</em></p>
  
  <p>Do you have any other solutions?</p>