From 82e595f72563ccdd56becdd975c27f5a55932d4f Mon Sep 17 00:00:00 2001 From: "Jonguk. Lim" Date: Tue, 24 Sep 2024 14:18:48 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20NICE=20CI=20=EC=9D=91=EB=8B=B5=20?= =?UTF-8?q?=EC=A0=84=EB=AC=B8=20parse=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/cokr/xit/ens/modules/nice/model/NiceDTO.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/cokr/xit/ens/modules/nice/model/NiceDTO.java b/src/main/java/cokr/xit/ens/modules/nice/model/NiceDTO.java index f0f6c31..5582870 100644 --- a/src/main/java/cokr/xit/ens/modules/nice/model/NiceDTO.java +++ b/src/main/java/cokr/xit/ens/modules/nice/model/NiceDTO.java @@ -1,6 +1,7 @@ package cokr.xit.ens.modules.nice.model; import java.io.*; +import java.nio.charset.*; import java.util.*; import java.util.stream.*; @@ -248,7 +249,8 @@ public class NiceDTO { sb.append(privateEmptyField); sb.append(queryRequests.stream().map(QueryRequest::ofString).collect(Collectors.joining())); sb.append(buttonRequests.stream().map(ButtonRequest::ofString).collect(Collectors.joining())); - return sb.toString(); + // FIXME: 인코딩확인후 적용 + return new String(sb.toString().getBytes(), StandardCharsets.UTF_8); } } @@ -408,7 +410,7 @@ public class NiceDTO { return sb.toString(); } - public NiceResponse parse(String tgtString) { + public NiceResponse parse(String tgtStr) { final int[] parseLength = { 9, // tr-code 83, // 공통부 @@ -420,6 +422,8 @@ public class NiceDTO { 1, // 연락처조회구분 84, // 공란 }; + // FIXME: 인코딩확인후 적용 + String tgtString = new String(tgtStr.getBytes(), StandardCharsets.UTF_8); if (StringUtils.isNotBlank(tgtString) && tgtString.length() >= 2319) { NiceResponse nr = new NiceResponse();