require 'uri'
url = 'http://sample=日本語テスト'
puts url
url2 =URI.escape(url)
puts url2
=>http://sample=~~~~~~~~~~~~~~~~~~~
=>http://sample=日本語テスト
Go to list of users who liked
Share on X(Twitter)
Share on Facebook
More than 5 years have passed since last update.
require 'uri'
url = 'http://sample=日本語テスト'
puts url
url2 =URI.escape(url)
puts url2
=>http://sample=~~~~~~~~~~~~~~~~~~~
=>http://sample=日本語テスト
Register as a new user and use Qiita more conveniently
Go to list of users who liked