title: UTF-8 data in Latin1 database: can it be saved?
body: <p>I have a rails app that receives data from an Android device. I noticed that some of the data, when in Japanese, is not saved correctly. It shows up as literal question marks (not the diamond ones) in the MySQL client and in the rails website.</p>
  
  <p>It turns out that the database that I have connected to the rails app is set to Latin1. Rails is set to UTF-8.</p>
  
  <p>I read a lot about character encodings, but they all mention that the data is somehow a bit readable. Mine however is only literal question marks. Also trying to convert the data to UTF-8 using several methods on the web doesn't change a thing. I suspect that the data is converted to question marks when it's written to the database.</p>
  
  <p>Sample output from the MySQL console: </p>
  
  <pre><code>select * from foo where bar = "foobar";
  +-------+------+------------------------+---------------------+---------------------+
  | id    | name | bar                    | created_at          | updated_at          |
  +-------+------+------------------------+---------------------+---------------------+
  | 24300 | ???? | foobar                 | 2012-01-23 05:04:22 | 2012-01-23 05:04:22 |
  +-------+------+------------------------+---------------------+---------------------+
  1 row in set (0.00 sec)
  </code></pre>
  
  <p>The input data, that my rails app got from the Android client was:</p>
  
  <pre><code>name = 爆笑笑話
  </code></pre>
  
  <p>This input data has been verified to exist in the rails app before saving to the database. So it's not mangled in the Android client or during transfer to the server. Is there any chance I can get this data back? Or is it completely lost?</p>