Net::IDN::PP(3)

πŸ“¦
version 0.03 Β· 2 versions
, in fedora 43, fedora 44

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 πŸ‘‘


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