Question: Illegal symbols in my CDA?
Sep 21, 2011Question: I have an xml file that gets sent to a cda.xsl in order for it to print out nicely via a web browser. The problem is that I am getting symbols like &188 (hex-BC)and &189 (hex-BD) and &190 (hex-BE) which represent fractions 1/4, 1/2, 3/4 is there a way to define this so that the browser doesn’t choke on the xml file that is created from the EMR system? You don’t say where you are getting the symbols from - but it sounds like from some stream of non-unicode text. I’d guess you’re getting content in the 8859/1. And then you’re creating an XML file for the CDA using a non-unicode aware production method, and either defaulting the character encoding or setting it to utf-8, and it isn’t.
You can resolve this by explicitly converting the content to unicode in your application, or by setting the character encoding to the correct value in the output XML document. Either way, you will have to figure out the correct character set of your input. Note that if your input is v2 messages, the actual character set is very frequently different to the specified character set.