On Tue, Apr 30, 2013 at 2:57 PM, James Agnew <[email protected]> wrote:
> The character encodings are only ever applied when the message is
> transmitted over a network socket using a LowerLayerProtocol impementation
> (either MLLP or HL7-over-HTTP). At all other times, HAPI uses Java Strings
> to represent any textual data, which means that everything is in UTF-16.
>
This is consistent with the test that I ran after setting JVM system
property "-Dca.uhn.hl7v2.llp.charset=UTF-8".
> In other words, setting the system property you mentioned will mean that
> if you create a new client with no other configuration, once your
> application connects to a remote server it will encode your message in the
> given charset before sending it.
>
Yes, this is what I discovered. Thank you for the explanation!
FWIW, there is a page in the HAPI examples section that shows some
> alternate ways of specifying the charset. Personally I hate using system
> properties..
>
>
> http://hl7api.sourceforge.net/xref/ca/uhn/hl7v2/examples/HandlingCharacterEncodings.html
>
Thank you for the reference. I was hoping there was another option
available to set the character encoding.
Derek
--
Derek Mahar | Research and Development - Intelerad
+1-514-931-6222 ext. 7754 |
[email protected]<[email protected]>
Website | Twitter | LinkedIn | Blog
--
This email or any attachments may contain confidential or legally
privileged information intended for the sole use of the addressees. Any
use, redistribution, disclosure, or reproduction of this information,
except as intended, is prohibited. If you received this email in error,
please notify the sender and remove all copies of the message, including
any attachments.
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
Hl7api-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hl7api-devel