wokket/rust-hl7

Add Decoding of special chars

wokket opened this issue · 2 comments

HL7 escapes special chars in various ways, eg \Cxxyy\ for arbitary unicode bytes, \F\ for the field separator char etc.

I'd like to add support for decoding these chars, but keep it separate from the current structs initially:

  • Make this a pay-to-play behaviour, if you're sure you don't have escaped characters (say, because you control the other end of the wire) we don't pay a performance penalty
  • Keep the existing files smaller/cleaner

Feature like the mllp bit? If you dont control the wire then you take the hit until you know all your data is clean...

A feature could work well actually, although it does complicate the testing etc matrix a bit.

Neatly solves the pay-to-play aspect without having to pass every, single, field, through a de-escaper of some sort...

I think I'd like to get your query stuff merged to master and a new release pushed for you pretty soon, and this can come in a +1 behind it. If you want to take this on feel free to assign yourself, otherwise if it's not something you have to deal with I'll look at it when I get a chance.