PunyCode.md

Introduction

Punycode is an encoding system developed according to the RFC 3492 standard, mainly used to convert domain names from Unicode encoding used in local languages to encoding that can be used in the DNS system.

For more details, see: RFC 3492

Usage

String text = "Hutool编码器";

// Hutool-ux9js33tgln
String strPunyCode = PunyCode.encode(text);

// Hutool编码器
String decode = PunyCode.decode("Hutool-ux9js33tgln");

// Hutool编码器
decode = PunyCode.decode("xn--Hutool-ux9js33tgln");