Most of the sample files I have from various customers use ~ as the delimiter.
One I have however uses \.
Your program is breaking with that file.
I have another Python library I have modified that also had this issue.
In that case I simply set the main delimiter as the 106 character just after the ISA.
In C# the data is a stream so I cant simply do that. Is there a way to pass a custom delimiter or is it expected behavior to find the delimiter by default?
When reading EDI files, the delimiters are automatically resolved from the ISA segment. The framework is able to parse EDI files with \ as segment separator (or any other separator) without any problems.
When writing EDI files, the framework will use the default separators per the standard, to generate the output. If you need a different set then you pass in a new Separators object to the writer constructor as described in the SDK here (line 102) and documentation here.
If you are trying to parse a transaction only, without an ISA envelope, then you have to pass in the separators to the reader constructor, sample here (line 368).
You don't have to modify anything at all.
After reviewing the EDI in question I see that you are correct.
When I first started reviewing the library I wasn't sure how to ready the data.
Looking at it again I see that the data is reading just fine.
Please sign in to leave a comment.