title: Ruby 1.9.2: irb throws ArgumentError: invalid byte sequence in UTF-8 when entering German Umlaut
body: <p>I want to enter German Umlauts in my irb but get a weird error. I can enter any character of <code>äöü</code> without problems, but each of <code>ÄÖÜß</code> leads to the following error:</p>
  
  <pre><code>$ irb
  ruby-1.9.2-p136 :001 &gt; ? # here I entered Ü but it displays only ?
  /Users/lorenz/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/1.9.1/irb/ruby-lex.rb:728:in
  `block in lex_int2': invalid byte sequence in UTF-8 (ArgumentError)
  </code></pre>
  
  <p>I have looked at a lot of SO questions regarding Ruby, rvm, and UTF-8 but none helped. Most are tied to rails or database configuration. I specifically checked the following:</p>
  
  <p>locale is set correctly</p>
  
  <pre><code>$ locale
  LANG="de_DE.UTF-8"
  LC_COLLATE="de_DE.UTF-8"
  LC_CTYPE="de_DE.UTF-8"
  LC_MESSAGES="de_DE.UTF-8"
  LC_MONETARY="de_DE.UTF-8"
  LC_NUMERIC="de_DE.UTF-8"
  LC_TIME="de_DE.UTF-8"
  LC_ALL="de_DE.UTF-8"
  </code></pre>
  
  <p>Terminal.app is set to Unicode (UTF-8) and Encoding.default_external is set correctly:</p>
  
  <pre><code>$ irb
  ruby-1.9.2-p136 :001 &gt; Encoding.default_external
   =&gt; #&lt;Encoding:UTF-8&gt;
  </code></pre>
  
  <p>Why is this still so difficult in Ruby?</p>