title: Write file in ruby with russian and polish symbols
body: <p>I need to write to html file some data, which could be non-english, now my code:</p>
  
  <pre><code>File.open('text2.html', 'wb') do |fo|
    fo.write body_text3
  end
  </code></pre>
  
  <p>also i try</p>
  
  <pre><code>File.open('text2.html', 'wb') do |fo|
    fo.write body_text3.encode('UTF-8')
  end
  </code></pre>
  
  <p>but i get error: :</p>
  
  <blockquote>
    <p>in `encode': "\xD0" from ASCII-8BIT to UTF-8
    (Encoding::UndefinedCon...</p>
  </blockquote>
  
  <p><strong>how could i save webpage with russian symbols?</strong></p>
  
  <p>also what i need to write, so that i could operate with nokogiri with my russian page? need i to do some conversations, or just # coding: utf-8  on top of code is enough?</p>