title: Running into encoding problems when exporting a table to a YAML file
body: <p>I'm getting the following error when I export a table to a yaml file:</p>
  
  <pre><code>Encoding::UndefinedConversionError: "\xC3" from ASCII-8BIT to UTF-8
  </code></pre>
  
  <p>This is the code that generate the error:</p>
  
  <pre><code>  File.open("#{Rails.root}/lib/users.yml", 'w') do |file|
      users = User.all
      YAML::dump(users, file)
    end
  </code></pre>
  
  <p>I've tried doing this on the content attributes of all User models:</p>
  
  <pre><code>about_me.force_encoding("utf-8")
  save
  </code></pre>
  
  <p>...to no avail, apparently. Was I forcing the encoding correctly? Is there another way to get around this problem? I don't mind getting rid of non-utf8 characters; how can I do that?</p>