Skip to content

The IDN Library to use by the Ruby-FFI

License

Notifications You must be signed in to change notification settings

RIPAGlobal/ruby-idna

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Idna

The IDN Library to use by the Ruby-FFI.

Installation

Add this line to your application's Gemfile:

gem 'idna'

And then execute:

$ bundle

Or install it yourself as:

$ gem install idna

Usage

Transform

  • Attach function to idna_to_ascii_8z:
Idna.to_ascii('あいうえお') #xn--l8jegik
  • Attach function to idna_to_unicode_8z8z:
Idna.to_unicode('xn--l8jegik') #あいうえお

Configure

  • Custome libidn name:
Idna.configure do |config|
  config.ffi_lib = 'idn.so.11'
end

Idna.reload!

Development

$ bundle exec rspec

License

  • MIT

About

The IDN Library to use by the Ruby-FFI

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 98.5%
  • Shell 1.5%