title: Why does String.replace with character classes convert German umlauts to Binaries?
body: <p>(Apologies if my terminology regarding Binaries is off - I'm still getting started with Elixir)</p>
  
  <p>While solving one of the <a href="http://exercism.io" rel="nofollow">Exercism questions for Elixir</a>, I noticed that <code>String.replace</code> as well as <code>Regex.replace</code> apparently convert German Umlauts to Binaries when using the <code>[:alnum:]</code> character class:</p>
  
  <pre><code>iex(1)&gt; String.replace("ö", ~r/[[:alnum:]]/, "_")
  &lt;&lt;95, 182&gt;&gt;
  iex(2)&gt; String.replace("ö", ~r/[^[:alnum:]]/, "_")
  &lt;&lt;195, 95&gt;&gt;
  iex(3)&gt; String.replace("ö", ~r/[_]/, " ")
  "ö"
  </code></pre>
  
  <p>Is this behaviour caused by my usage of the <code>[:alnum:]</code> character class? (what really baffles me is that both the first and the second version return a Binary)</p>