Hi Craig, (I'm the one who translated your lib to Python)
I just saw that your tests don't cover the possibility that EDIFACT files could have line breaks.
the tests read the files line-wise, and cut out each "\n".
Other files (like in medical purpose) use lines like
UNA:+,? '[snip]
FTX+BFD++Herr
'FTX+BFD++Dr?. Max Musterarzt
'FTX+BFD++Beispielstraße?. 13
'[snip]
So there is a \n after each line, but before the ' - so that the \n is a part of the freetext there.
It's not easy to check that correctly, but you can't just drop all "\n"s.
An (dumb) approach would be to drop all "\n" which follow an segment terminator...? (they are just for readability of an EDI file)
Greetings from Salzburg,
Christian
Hi Craig, (I'm the one who translated your lib to Python) I just saw that your tests don't cover the possibility that EDIFACT files could have line breaks. the tests read the files line-wise, and cut out each "\n".
Other files (like in medical purpose) use lines like
So there is a \n after each line, but before the
'
- so that the \n is a part of the freetext there. It's not easy to check that correctly, but you can't just drop all "\n"s.An (dumb) approach would be to drop all "\n" which follow an segment terminator...? (they are just for readability of an EDI file) Greetings from Salzburg, Christian