Punycode 是一种把包含非 ASCII 字符(如中文、阿拉伯文、带重音符的拉丁字母等)的 Unicode 域名 转换成仅含 ASCII 字符的编码方式,主要用于 国际化域名(IDN) 在传统 DNS 系统中安全、兼容地传输与解析。常见形式以 xn-- 开头。
/ˈpjuːniˌkoʊd/
My browser converts the domain name to Punycode automatically.
我的浏览器会自动把域名转换成 Punycode。
To avoid spoofing issues, the system logs both the Unicode domain and its Punycode form (starting with “xn--”).
为避免域名伪造风险,系统会同时记录 Unicode 域名及其以 “xn--” 开头的 Punycode 形式。
Punycode 由 puny(“弱小的、简陋的”,此处带有“受限字符集”的意味)+ code(“编码”)组合而成,强调把丰富的 Unicode 字符“压缩/映射”到受限制的 ASCII 字符范围内,以实现兼容性。