tasuki/elm-punycode/1.1.1

NOTE: the latest version is 1.2.1

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"