simple_idn

SimpleIdn for Crystal language. Translated from Ruby https://github.com/mmriis/simpleidn

SimpleIdn

SimpleIdn for Crystal language. Translated from Ruby https://github.com/mmriis/simpleidn.

This shard allows easy conversion from punycode ACE strings to unicode UTF-8 strings and visa versa.

The implementation is heavily based on the RFC3492 C example implementation but simplified since it does not preserve case.

Installation

Add this to your application's shard.yml:

dependencies:
  simple_idn:
    github: kostya/simple_idn

Usage

require "simple_idn"

puts SimpleIdn.to_unicode("xn--mllerriis-l8a.com")
# => møllerriis.com

puts SimpleIdn.to_ascii("møllerriis.com")
# => xn--mllerriis-l8a.com
Repository

simple_idn

Owner
Statistic
  • 7
  • 0
  • 0
  • 0
  • 0
  • over 3 years ago
  • May 1, 2016
License

MIT License

Links
Synced at

Fri, 22 Nov 2024 13:13:29 GMT

Languages