Fix Ruby 2+ encoding issue