More Ruby 1.9 encoding fixes