Force encoding utf-8 for ruby 1.9

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Merge branch 'fix-for-ruby-1-9' into 'master'

Fix for ruby 1.9

Fixes #1452

See merge request !988
Merge branch 'master' of github.com:gitlabhq/gitlabhq