A pure Erlang IDNA implementation.
Erlang
Switch branches/tags
Nothing to show
Pull request Compare This branch is 1 commit behind superbobry:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
priv
src
test
.gitignore
LICENSE
README.md
rebar.config

README.md

idna

Punycode (and IDNA) implementation for Erlang.

Quick start:

Start with the usual rebar boilerplate:

$ rebar get-deps compile
==> ux (compile)
==> erlang-idna (compile)
Compiled src/punycode.erl
Compiled src/idna.erl

Now, it's time for some action!

$ erl -pa ebin deps/*/ebin
1> Domain = xmerl_ucs:from_utf8("президент.рф").
[1087,1088,1077,1079,1080,1076,1077,1085,1090,46,1088,1092]
2> idna:to_ascii(Domain).
"xn--d1abbgf6aiiy.xn--p1ai"
3> idna:from_ascii("xn--d1abbgf6aiiy.xn--p1ai").
[1087,1088,1077,1079,1080,1076,1077,1085,1090,46,1088,1092]

Reference material: