require 'addressable/uri'
url_string="http://www.podshypnik.info/index.php?zid=bearing_info&standart=gost8338&bearing=28К".encode('Windows-1251','UTF-8')
url=Addressable::URI.parse(url_string)
url=url.normalize
puts url
# encoding: utf-8
require 'uri'
puts URI::encode 'www.example.com/index.htm?id=текст'