After some research, I have answered my own question. If no character set is 
defined in MSH-18, then the default is single byte printable ASCII (decimal 
32-127).

If anyone is interested, I am attaching a test ORU file which includes a full 
set of UTF-8 characters, above and beyond what is supported. You can trim it to 
use this in your tests, or test a more extensive UTF-8 support if you like.

-tom


From: Tom Wilson [mailto:twil...@sujansky.com]
Sent: Tuesday, January 14, 2014 10:27 AM
To: hl7api-devel@lists.sourceforge.net
Subject: [HAPI-devel] UTF-8 support, how to define and test?

Hi.

I’m in the final testing phase of a HAPI-based application, and I want to 
define precisely what character encoding it can support. I know the HL7v2 spec 
defines UTF-8 as the supported character set. However, it looks like it is only 
supporting a subset of UTF-8. I am testing by ingesting an HL7v2 message in a 
unit test and serializing to XML. For example, it looks like Simplified 
Chinese, Vietnamese, Cyrillic, are not supported.

Sending this in an NTE segment:
我能吞下玻璃而不伤身体

Produces this on the other end:
???????????

So, exactly what UTF-8 characters can I expect to work? I also want to create a 
unit test with a full range of the supported characters.

It might be nice to support other languages, but I don’t know if I can expect 
to receive them from EMR systems.

Thanks in advance,

-tom

Attachment: complete-utf8-set.oru
Description: complete-utf8-set.oru

------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
Hl7api-devel mailing list
Hl7api-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/hl7api-devel

Reply via email to