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>