idna2008

Strict IDNA2008 for Haskell

https://github.com/dnsbase/idna2008

Latest on Hackage:1.0.0.1@rev:1

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.

BSD-3-Clause licensed by Viktor Dukhovni
Maintained by [email protected]

A Haskell library for parsing and validating internationalized domain names, which may contain characters from non-Latin scripts (Greek, Hebrew, Arabic, CJK, ...) alongside the conventional letters, digits, and hyphens.

Given a domain name as the user typed it, the library checks that every label is well-formed, encodes any non-ASCII labels into their ACE-prefixed form for the wire, tells the caller what kind of label each one is, and (optionally) renders the parsed name back to display form.

A single domain name often mixes several kinds of labels. The library reports each label as one of: a conventional hostname-style letter-digit-hyphen label, a legacy reserved label, an internationalized label encoded as Punycode, an "xn--"-prefix that turns out not to decode cleanly, a Unicode label, an underscore-prefixed service-discovery label (e.g. _25._tcp, _dmarc), an arbitrary-bytes label, or the DNS wildcard. Most existing IDNA libraries don't make these distinctions; this library does.

Strict IDNA2008. Some browsers and language standard libraries use a more permissive variant of the IDNA standard that accepts characters strict IDNA2008 rejects; this library does not use that variant.

Originally factored out of the dnsbase library; conformance test vectors are published as JSON for reuse by ports to other languages.