#!/usr/local/bin/ruby require 'uri' url = 'http://hogehoge.com/hogahoga.cgi?test=日本語テスト' url_escape = URI.escape(url)