There is an ongoing outage on the primary CPAN mirror. It is possible to work around the issue by using MetaCPAN as a mirror.

NAME

Net::IDN::PP - A pure-Perl implementation of the Punycode algorithm for encoding internationalized domain names (IDNs)

VERSION

version 0.01

SYNOPSIS

use Net::IDN::PP;

say Net::IDN::PP->decode('xn--caf-dma.com'); # prints café.com

say Net::IDN::PP->decode('café.com'); # prints xn--caf-dma.com

DESCRIPTION

Net::IDN::PP is a pure Perl IDN encoder/decoder. The decode() method takes an "A-label" and decodes it, and encode() takes a "U-label" and encodes it.

Other modules exist which provide similar functionality, but they all rely on external C libraries such as libidn/libidn2 or ICU.

IMPORTANT NOTE

This module only implements the Punycode algorithm from RFC 3492; it does not implement any of the "Nameprep" logic described in IDNA2003 or IDNA2008. This makes it unsuitable for use in provisioning (domain registrar or registry) systems, but it should work fine if you don't mind working on a "garbage in, garbage out" basis.

AUTHOR

Gavin Brown <gavin.brown@fastmail.uk>

COPYRIGHT AND LICENSE

This software is copyright (c) 2025 by Gavin Brown.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.