require 'pr_query_parser' module QueryStringParser module_function def qs_parse(query_string, delim = '&') return {} if query_string.nil? || query_string == "" ret = (query_string + "\x20").force_encoding('UTF-8').encode('UTF-16', :invalid => :replace, :replace => '').encode('UTF-8')[0..-2] pr_query_parser(ret, delim) end end