-
Notifications
You must be signed in to change notification settings - Fork 138
Open
Labels
Description
I have received some x12 214 files that have a value of \u001d (character 29) in position 105 of the file (which is the value for ISA16, the component element separator). When I try to parse those files using stupidedi it gets a fatal error that seems to indicate that it's skipping that character. It gets the S and the field separator (\u001e) instead of GS as the segment identifier and doesn't like it. The error is found "S\u001E" instead of segment identifier
. But when I replace that character with a different one (e.g., _
) it works fine.
Is there a way to get it to accept that character (\u001d) as the component element separator?
For what it's worth, my code to that point looks basically like:
config = Stupidedi::Config.contrib
parser = Stupidedi::Builder::StateMachine.build(config)
machine, result = parser.read(Stupidedi::Reader.build(file))
if result.fatal?
result.explain {|reason| raise EDI214Error.new(reason + " at #{result.position.inspect}") }
end