You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "JHPark1 (Jira)" <ji...@apache.org> on 2021/06/11 06:44:00 UTC

[jira] [Created] (GROOVY-10132) XmlUtil.serialize ( unitcode: 0xd83c) bug

JHPark1 created GROOVY-10132:
--------------------------------

             Summary: XmlUtil.serialize ( unitcode: 0xd83c) bug
                 Key: GROOVY-10132
                 URL: https://issues.apache.org/jira/browse/GROOVY-10132
             Project: Groovy
          Issue Type: Bug
         Environment: os : window 10
jdk : 1.8
groovy : 3.0.8
            Reporter: JHPark1
         Attachments: 캡처.PNG, 캡처1.PNG

sorry. I can't Wirte English.

 

groovy version : 3.0.8

 

tet code : 

 

import groovy.xml.XmlSlurper
import groovy.xml.XmlUtil

def xml = '''<?xml version='1.0' encoding='utf-8'?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:n="http://shopn.platform.nhncorp.com/"><soapenv:Body><n:GetOptionResponse><n:ResponseType>SUCCESS</n:ResponseType><n:ResponseTime>19</n:ResponseTime><n:Version>2.0</n:Version><n:Timestamp>2021-06-11T05:30:25.55Z</n:Timestamp><Option><n:ProductId>5606052622</n:ProductId><n:SortType>CRE</n:SortType><n:Combination><n:Names><n:Name1>🎁4개이상 구매시 10% 추가할인</n:Name1></n:Names><n:ItemList><n:Item><n:Id>18011522941</n:Id><n:Value1>닭가슴살 11g X 5개입</n:Value1><n:Price>0</n:Price><n:Quantity>99998</n:Quantity><n:Usable>Y</n:Usable></n:Item><n:Item><n:Id>18011522943</n:Id><n:Value1>북어 11g X 5개입</n:Value1><n:Price>0</n:Price><n:Quantity>99999</n:Quantity><n:Usable>Y</n:Usable></n:Item><n:Item><n:Id>18011522945</n:Id><n:Value1>참치 11g X 5개입</n:Value1><n:Price>0</n:Price><n:Quantity>99998</n:Quantity><n:Usable>Y</n:Usable></n:Item><n:Item><n:Id>18011522947</n:Id><n:Value1>열빙어 11g X 5개입</n:Value1><n:Price>0</n:Price><n:Quantity>99998</n:Quantity><n:Usable>Y</n:Usable></n:Item></n:ItemList></n:Combination><n:DeliveryAttribute><n:Type>TODAY</n:Type></n:DeliveryAttribute></Option></n:GetOptionResponse></soapenv:Body></soapenv:Envelope>
'''

def parse = new XmlSlurper().parseText(xml)
println(parse) // xml parsing  work.

def recoverXml = XmlUtil.serialize(parse)
println(recoverXml) // error.  ( unicode : 0xd83c error )

 

 

thank.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)