Some EDI translation fixes for troublesome input characters collab/senator/edi-translation-improvements
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Mon, 19 Sep 2011 17:19:22 +0000 (13:19 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Mon, 19 Sep 2011 17:38:04 +0000 (13:38 -0400)
commit411f495173b80582cd6edca80500663b7d521c15
treeb81a9dd8bd9327e4476e5d3b9e05f3a614e014ba
parent22dc530aeb26749ebaf6121353d97f8ce4a252b3
Some EDI translation fixes for troublesome input characters

This attempts to address enough of the issues in
https://bugs.launchpad.net/evergreen/+bug/812593 to move forward.

When the ? character appears in lineitem attributes for a PO that we
send off for EDI translation, the translator fails if that ? is the last
character of the string.  This commit avoids that situation.

This commit also removes any Unicode characters from the JEDI (the input
to the translator process), as they're not going to make it to the
EDIFACT output anyhow, and will just confound the translator.

This commit also pre-escapes quotation marks in lineitem attributes so
that we don't produce invalid JSON for our JEDI.

This commit also destroys the death star.

Seriously, the right way to fix some of the issues people have had is
for somebody to learn Ruby and to address them either in edi_webrick.rb, in
edi4r, or in openils-mapper (wherever the issues may be).  Working on
that.

Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Trigger/Reactor.pm
Open-ILS/src/sql/Pg/950.data.seed-values.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.data.jedi-template.sql [new file with mode: 0644]
Open-ILS/src/support-scripts/edi_pusher.pl