web stats
DocumentWriter - RTF fails on certain characters - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 03-03-2011, 08:51 AM
john.newman john.newman is offline
OBX.3 Kenobi
 
Join Date: Oct 2009
Posts: 124
john.newman is on a distinguished road
Default DocumentWriter - RTF fails on certain characters

Hello,

A good chance this will end up in jira, but I wanted to check here first and see if I'm missing something. I hate to bring anyone else into character encoding hell since I've been there quite a bit myself, but a customer is requesting this and I'm forced to do a text replace in mirth and then outside of mirth until I figure this out..

javascript reader:
return "test";
document writer:
rtf
${message.encodedData}

works fine. produces my rtf document with "test" in it no problem.

javascript reader:
return "test®";
document writer:
rtf
${message.encodedData}

same as before except with the ® character. Now this always fails with

ERROR-401: Document connector error
ERROR MESSAGE: Error writing document
ExceptionConverter: org.apache.xerces.impl.io.MalformedByteSequenceExc eption: Invalid byte 1 of 1-byte UTF-8 sequence.
at org.apache.xerces.util.ErrorHandlerWrapper.createS AXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalEr ror(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportErro r(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportErro r(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerI mpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse (Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse( Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser .parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at com.lowagie.text.html.HtmlParser.go(Unknown Source)
at com.mirth.connect.connectors.doc.DocumentMessageDi spatcher.writeDocument(DocumentMessageDispatcher.j ava:170)
at com.mirth.connect.connectors.doc.DocumentMessageDi spatcher.doDispatch(DocumentMessageDispatcher.java :90)
at com.mirth.connect.connectors.doc.DocumentMessageDi spatcher.doSend(DocumentMessageDispatcher.java:180 )
at org.mule.providers.AbstractMessageDispatcher.send( AbstractMessageDispatcher.java:164)

It seems like any extended character will do that. AND I end up with a blank document. So two things, the connector needs to handle these characters, and if an error occurs, it should not leave an empty document on disk.

Changing the type to PDF works fine including the ® character. So it could be an issue with the itext library, or the way mirth is passing data to itext is different from rtf vs pdf.

Any workarounds or thoughts? Should I go to jira and attach a test case channel?

Thanks!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 01:55 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation