Closed benisantos closed 4 years ago
Hi @benisantos - is there any way your clients can disable the repetition separator in the UNA
? by sending a space? The trouble is that the documentation says it is not used, but then tells you to send a value in UNA
:-)
No, I'm afraid not. There are several clients acting like that, and there is a legacy app supporting those things... :(
@benisantos - I can add the ability to force the value of a delimiter, i.e. setting the repetition character to a blank space in this case would work. Until that is ready, do you have any way to change that position of the UNA
to a blank space prior to parsing it?
Perfect @MikeEdgar ! In the meantime, we will preprocess the file to "hack" the UNA segment :)
Thank you so much.
@benisantos - my plan for implementing this change is to only allow the repetition separator to be used if the EDIFACT version is 4 or later (UNB element 1, component 2). This means if you write a UNA
segment directly or by overriding the delimiters when writing with the EDIStreamWriter
, it will result in a blank written in the UNA
for the repetition character. This is the documented use for the UNA
prior to EDIFACT version 4. Given that the repetition character is supposed to be ignored for PADIS, this should not be an issue.
Please let me know if you see any issues with that approach.
@benisantos - I also now noticed that although the documentation states the repeater is not used and does not need to be escaped, the first example shown in the document shows the repeater being escaped...
The existing unit test that used that example was updated for this change: https://github.com/xlate/staedi/pull/81/files#diff-4699360291fcb4eb52a263e42c556afc
I've tried version 1.9.5-SNAPSHOT from master and it works as expected! Thank you so much @MikeEdgar
@benisantos - version 1.10.0
has been released with this change included.
Thank you again @MikeEdgar
PADIS EDIFACT from IATA says (source):
So, our clients are sending files like:
Where those asterisks are content, not separators :(
¿Would it be possible to support a setting to ignore the repetition separator?