update for ruby2
there is a failing encoding test, in the specs, and your caller may need to call force_encoding('UTF-8') before saving the result in a ruby2 env