simple_idn

Version, currently 0.33 versions

github.com/kostya/simple_idn

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

8 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  simple_idn:
    github: kostya/simple_idn
    version: ~> 0.3

Then run:

shards install

shard.yml

Crystal
*
License
MIT
Author
Konstantin Makarchev <kostya27@gmail.com>

Dependencies

This version declares no dependencies.

README

# 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`:

```yaml
dependencies:
  simple_idn:
    github: kostya/simple_idn
```


## Usage


```crystal
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
```