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();