idna2008: Strict IDNA2008 for Haskell
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.
[Skip to Readme]
Downloads
- idna2008-1.0.0.1.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
| Versions [RSS] | 0.0.1.0, 1.0.0.0, 1.0.0.1 (info) |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | base (>=4.18 && <5), bytestring (>=0.11 && <0.13), idna2008, primitive (>=0.9 && <0.10), template-haskell (>=2.20 && <2.25), text (>=2.0 && <2.2) [details] |
| Tested with | ghc ==9.6.7, ghc ==9.8.4, ghc ==9.10.3, ghc ==9.12.4, ghc ==9.14.1 |
| License | BSD-3-Clause |
| Copyright | 2026 Viktor Dukhovni |
| Author | Viktor Dukhovni |
| Maintainer | ietf-dane@dukhovni.org |
| Uploaded | by ietfdane at 2026-06-10T23:56:21Z |
| Revised | Revision 1 made by ietfdane at 2026-07-03T05:34:22Z |
| Category | Text |
| Home page | https://github.com/dnsbase/idna2008 |
| Bug tracker | https://github.com/dnsbase/idna2008/issues |
| Source repo | head: git clone https://github.com/dnsbase/idna2008.git |
| Distributions | |
| Reverse Dependencies | 2 direct, 4 indirect [details] |
| Downloads | 1211 total (14 in the last 30 days) |
| Rating | 2.0 (votes: 1) [estimated by Bayesian average] |
| Your Rating | |
| Status | Docs uploaded by user Build status unknown [no reports yet] |