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)
committerMike Rylander <mrylander@gmail.com>
Mon, 26 Sep 2011 16:11:54 +0000 (12:11 -0400)
commitaca9a4d5c7879737ca6fd26fa9b98bee413b93b5
treea1e161ef22c184326b0d17e9deb411afc2f3c562
parentfac08ad3cf420e35550c8e64cb36b866210ea125
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