From 021419b8a2aadb6e6e0e28c341d4cd7bd0172eb1 Mon Sep 17 00:00:00 2001 From: zhaoxinhu <759054522@qq.com> Date: Wed, 31 May 2023 09:28:13 +0800 Subject: [PATCH] =?UTF-8?q?punycode=E4=B8=AD=E5=A4=A7=E5=86=99=E5=AD=97?= =?UTF-8?q?=E6=AF=8D=E8=A7=A3=E7=A0=81=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=8C=E7=BB=9F=E4=B8=80=E7=BC=96=E7=A0=81?= =?UTF-8?q?=E5=92=8C=E8=A7=A3=E7=A0=81=E4=B8=BA=E5=B0=8F=E5=86=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- hutool-core/src/main/java/cn/hutool/core/codec/PunyCode.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hutool-core/src/main/java/cn/hutool/core/codec/PunyCode.java b/hutool-core/src/main/java/cn/hutool/core/codec/PunyCode.java index ea3b32db5..990d6364f 100644 --- a/hutool-core/src/main/java/cn/hutool/core/codec/PunyCode.java +++ b/hutool-core/src/main/java/cn/hutool/core/codec/PunyCode.java @@ -36,6 +36,7 @@ public class PunyCode { */ public static String encodeDomain(String domain) throws UtilException { Assert.notNull(domain, "domain must not be null!"); + domain = domain.toLowerCase(); final List split = StrUtil.split(domain, CharUtil.DOT); final StringBuilder result = new StringBuilder(domain.length() * 4); for (final String str : split) { @@ -156,6 +157,7 @@ public class PunyCode { */ public static String decodeDomain(String domain) throws UtilException { Assert.notNull(domain, "domain must not be null!"); + domain = domain.toLowerCase(); final List split = StrUtil.split(domain, CharUtil.DOT); final StringBuilder result = new StringBuilder(domain.length() / 4 + 1); for (final String str : split) {