#LibIdn FFI ruby binding
sudo apt-get install libidn11
Gemfile:
gem 'idn_ffi'
IDNFFI.to_ascii "топ-site.рф"
=> "xn---site-iyehw.xn--p1ai"
IDNFFI.to_unicode "xn---site-iyehw.xn--p1ai"
=> "топ-site.рф"
Project
#LibIdn FFI ruby binding
sudo apt-get install libidn11
Gemfile:
gem 'idn_ffi'
IDNFFI.to_ascii "топ-site.рф"
=> "xn---site-iyehw.xn--p1ai"
IDNFFI.to_unicode "xn---site-iyehw.xn--p1ai"
=> "топ-site.рф"