tasuki / elm-punycode / Punycode

Punycode is a Unicode encoding used for internationalized domain names.

Decoding

decode : String -> String

Decodes a Punycode-encoded string into Unicode.

Attempts to follow RFC 3492.

import Punycode

Punycode.decode "bcher-kva" == "bücher"

decodeIdn : String -> String

Decodes an internationalized domain name into Unicode.

Attempts to follow RFC 3492 using the xn-- ACE prefix for each encoded part.

import Punycode

Punycode.decodeIdn "www.xn--bcher-kva.example" == "www.bücher.example"