|
From: Jim K. <ji...@ho...> - 2006-07-17 21:19:42
|
Hi Nico- Thanks for the response. You're suggesting that I make sure to include the encoding attribute in the XML prolog and set it to utf-8, right?: <?xml version="1.0" encoding="UTF-8"?> Unfortunately the vendor we're working with won't accept an XML file unless it can be opened in IE (which boggles my mind since the system is written in Java and delployed on web logic). If you create an xml file, set it up with a proper prolog and then try embedding the µ character in it (aka java character \u00B5) you'll find that IE won't open it no matter what. At this point, it really boils down to an issue with the system we're messaging to and not HAPI. On another topic, how's progress towards HAPI v0.5 coming along? >From: ni...@sk... >To: ji...@ho..., hl7...@li... >Subject: RE: [HAPI-devel] utf-8 characters in XML encoded HL7 messages >Date: Fri, 14 Jul 2006 12:57:18 +0200 > >Hi Jim, > >I'm affraid the xml parser used in HAPI doesn't support character entities. > >But for an xml document I don't see an immediate reason to use character >entities, you can just specifiy the character in your xml document since >it's UTF-8 encoded. > >If my explanation is not clear, please send me your xml file ... I'll >update it ... > >Thanks > >Regards > >Nico > > > > > > >Hey All-I'm having an issue with XMLSerializer's handling of character >encodings. I'm sending antibiotic sensitivity results via OBX segments in >ORU^R01 messages. The OBX needs to communicate the units used in the >measurement being reported. In one case, we need to use the character >encoding known as the micro sign. Hopefully, the email will render this >correctly, but the following xml snippet shows what I'd like to send, which >is the HTML character encoding for the micro sign: µ/mLUnfortunately, once >the XMLSerializer is done with it I end up with this (again if the >characters are mangled, the example shows the ampersand for the micro sign >transformed into an HTML character encoding for ampersand followed by the >text string \"micro;\": µ/mLIf you look at the source code for >XMLSerializer you'll see that it doesn't recognize or respect HTML encoding >characters when it sees them. As soon as it sees an ampersand, regardless >of the context, it transforms it into its HTML charac! > ter >encoding equvalent.If I try simply sending through the character or its >unicode equivalent the serializer happily sends it through untouched, but >the system I'm sending to isn't able to cope with it and rejects the >message. It will only accept the html character encoding.Does anyone have a >work around for this that doesn't involve post processing the XML >representation of the message with some kind of search and >replace?Thanks.-------------------------------------------------------------------------Using >Tomcat but need to do more? Need to support web services, security?Get >stuff done quickly with pre-integrated technology to make your job >easierDownload IBM WebSphere Application Server v.1.0.1 based on Apache >Geronimohttp://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642_______________________________________________Hl7api-devel >mailing >lis...@li...://lists.sourceforge.net/lists/listinfo/hl7api-devel |