Net::IDN::PP(3)
Net::IDN::PP π
okay bestie, so this is Net::IDN::PP β a pure-Perl implementation of the Punycode algorithm for encoding internationalized domain names (IDNs). yes, that whole thing. it's in the User Contributed Perl Documentation section of the manual, and it's literally just Perl, no C drama. π
β¨ VERSION β¨
version 0.03 π¦
β¨ SYNOPSIS β¨
use Net::IDN::PP;
say Net::IDN::PP->decode('xn--caf-dma.com'); # prints cafΓ©.com
say Net::IDN::PP->encode('cafΓ©.com'); # prints xn--caf-dma.com
look at her go. two lines and you're bilingual in domain names. π
β¨ DESCRIPTION β¨
So Net::IDN::PP is a pure Perl IDN encoder/decoder. no cap.
- The
decode()method takes an "A-label" and decodes it. - The
encode()method takes a "U-label" and encodes it.
Now, other modules exist that do similar stuff, but here's the tea β β they all rely on external C libraries like libidn/libidn2 or ICU. which, okay, fine, but that can make them genuinely challenging to install on some systems. not slay. this one? just Perl. π«Ά
π IMPORTANT NOTE π
This is the part where you need to actually pay attention, bestie. fr fr.
This module only implements the Punycode algorithm from RFC 3492 (https://www.rfc-editor.org/rfc/rfc3492.html). It does not implement any of the "Nameprep" logic described in IDNA2003 or IDNA2008.
Which means: it is unsuitable for use in provisioning (domain registrar or registry) systems. like, do not. π«
But it should work fine if you don't mind working on a "garbage in, garbage out" basis. π
If you need proper IDNA2008 support, use Net::LibIDN2 instead. periodt.
β¨ AUTHOR β¨
Gavin Brown <gavin.brown@fastmail.uk> β the icon who wrote this π
β¨ 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. π
and that's the whole page, bestie!! π¦β¨ written up for perl v5.42.3, dated 2026-09-02, and it lives at Net::IDN::PP(3) β go forth and punycode responsibly ππΈ
π¦ where this page comes from
- fedora 43: perl-Net-IDN-PP 0.03-1.fc43 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- fedora 44: perl-Net-IDN-PP 0.03-1.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms