title: ruby gsub cannot replace more than 1 character if file is iso8859-1
body: <p>I just noticed very strange behavior of gsub method and maybe somebody can explain this to me.
  I have file which I open with standard</p>
  <pre><code>f=File.read(filename)
  puts f.gsub('xxxxx','a')
  </code></pre>
  <p>this works fine and all xxxxx strings are replaced with a</p>
  <p>if I open same file encoded originally in iso-8859-1</p>
  <pre><code>f=File.read(filename,:encoding =&gt; 'iso-8859-1')
  puts f.gsub('xxxxx','a')
  </code></pre>
  <p>this doesnt work...there is no error, just ignores and xxxxx is not replaced
  but with 1 char only it works nice</p>
  <pre><code>f=File.read(filename,:encoding =&gt; 'iso-8859-1')
  puts f.gsub('x','a')
  </code></pre>
  <p>is there a reason why?</p>
  <p>edit: I am adding example file as a link to gdrive...it is default export from sql server
  <a href="https://drive.google.com/file/d/1lDXfXmo5mXF9GxuxFdA9tVIK-nWVAkbH/view?usp=sharing" rel="nofollow noreferrer">file_in_zip</a></p>