Fix character encoding issue on Rubies < 2