XML codec failed due to special charecter like '\u0000' #4

Open
tutufool opened this Issue Jan 18, 2013 · 0 comments

Comments

Projects
None yet
1 participant
@tutufool

Hi,

I got some exception when trying to using xml codec:

Caused by: com.ctc.wstx.exc.WstxIOException: Invalid null character in text to output
at com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:488)
at protobuf.codec.xml.XmlWriter.writeFieldValue(XmlWriter.java:68)
at protobuf.codec.xml.XmlWriter.writeXml(XmlWriter.java:47)
at protobuf.codec.xml.XmlCodec.writeToStream(XmlCodec.java:69)
... 26 more
Caused by: java.io.IOException: Invalid null character in text to output
at com.ctc.wstx.api.InvalidCharHandler$FailingHandler.convertInvalidChar(InvalidCharHandler.java:51)
at com.ctc.wstx.sw.XmlWriter.handleInvalidChar(XmlWriter.java:623)
at com.ctc.wstx.sw.BufferingXmlWriter.writeCharacters(BufferingXmlWriter.java:475)
at com.ctc.wstx.sw.BaseStreamWriter.writeCharacters(BaseStreamWriter.java:486)
... 29 more

It seems null characters like '\u0000' - '\u0020' can't be rendered correctly.

I'm not sure if it's a bug for woodstox (or it's already fixed in newer version).

Could you please take a look?

Thanks
Ma Ling

tutufool pushed a commit to tutufool/protobuf-codec that referenced this issue Jan 22, 2013

lma
fix bugs:
#5
XML codec throw java.util.NoSuchElementException when message is too long

#4
XML codec failed due to special charecter like '\u0000'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment