It's 2016 and I still managed to have a unicode issue
If you ever run into an issue that looks related to unicode/utf (you get characters such as “\00eb”), check if it’s installed on your system.
I recently was stumped by this, because my sinatra/ruby application worked on my dev machine, but not on the server (I’ve heard that one before! ;-) ). Turns out utf wasn’t installed on the server (a debian machine).
For future reference, it’s easy to install:
- append en_US UTF-8 to /etc/locale.gen
- run “locale-gen” as root
- (optional) export this variable in your terminal export LANG=en_US.UTF-8
- Make the environment variable available for apache/passenger/ruby. You do this by putting SetEnv LANG en_US.UTF-8 in the appropriate vhost.