Some EDI translation fixes for troublesome input characters
authorLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Mon, 19 Sep 2011 17:19:22 +0000 (13:19 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Mon, 26 Sep 2011 16:35:40 +0000 (12:35 -0400)
commit20381dc9f188ae071cb18888107373c7c42864c0
treebda34789eb6a81fcb81d0a1c43408e771d8e981b
parente400aadde56d7ef8390ab7f4f981201c676b0309
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>
Signed-off-by: Mike Rylander <mrylander@gmail.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