title: MongoMapper Error "\xFF" from ASCII-8BIT to UTF-8 when storing a file in DB
body: <p>I have a problem to Store file (from a remote API) in MongoDB, i'm with Ruby 1.9</p>
  
  <pre><code>class Foo
    include ::MongoMapper::Document
    key :bar, String
  end
  </code></pre>
  
  <p>I get the following error : "\xFF" from ASCII-8BIT to UTF-8</p>
  
  <p>I tried the following things :</p>
  
  <pre><code>foo.bar = pdf_data.encode('UTF-8')
  foo.bar = pdf_data.force_encoding('UTF-8')
  foo.bar = pdf_data.ensure_encoding('UTF-8',
    :external_encoding  =&gt; :sniff,
    :invalid_characters =&gt; :transcode
  ) # with github.com/Manfred/Ensure-encoding
  </code></pre>
  
  <p>Well any of them work, I get an error while save call ...</p>
  
  <p>I look on the net but I didn't find any clear responce (or at least solving my probleme)...
  Any idea what i'm supposed to do to be able to store it ?</p>