title: Invalid Byte Sequence In UTF-8 Ruby
body: <p>I have the string like this <code>"abce\xC3".sub("a","A")</code>, when i execute the line i get the following error.</p>
  
  <pre><code>ArgumentError: invalid byte sequence in UTF-8
      from (irb):20:in `sub'
      from (irb):20
      from /home/vijay/.rvm/rubies/ruby-2.0.0-p598/bin/irb:12:in `&lt;main&gt;'
  </code></pre>
  
  <p>Can someone help me to solve this problem.</p>