And the Ruby side should use URI::Escape's unescape method.