My local (Mac) and remote (Ubuntu 14.04) MySQL database and table are in UTF-8. Local is using Ruby 2.2.0, remote is using Ruby 2.2.3.
On my local machine, I tested the script in IRB:
irb(main):004:0> item.at('title').text
=> "Öndör Gegeen Zanabazaryn Gudamj"
Then I ran the script ruby abc.rb
and got it stored in the database exactly as
Öndör Gegeen Zanabazaryn Gudamj
On my remote machine, I tested the script on IRB:
irb(main):004:0> item.at('title').text
=> "\u00D6nd\u00F6r Gegeen Zanabazaryn Gudamj"
Then I ran the script ruby abc.rb
but got it stored in the database as:
Öndör Gegeen Zanabazaryn Gudamj
What settings should I do on my remote in order to store the data correctly as my local?