Use CGI.unescape instead of URI.unescape for encoding issue