Closed mj0nez closed 1 year ago
Yes, it's always a shame that there are established standards, and companies just ignore them and cook their own soup. I don't have time to implement this, but it seems to be a requirement on your side, so if you want to implement this, it surely would be a helpful enhancement!
Done: https://github.com/nerdocs/pydifact/pull/59. Conflicts are resolved.
Seems that merging the github-actions branch introduced a new conflict...
Fixed :)
Thanks for your great ideas and additions, merged.
The German energy sector uses a EDIFACT subset for market communication (edi@energy), which implements a set of control characters differing from the current defaults (see the decimal separator on p. 49 Allgemeine Festlegungen zu den EDIFACT- und XML-Nachrichten).
Currently, an UNA segment is only mandatory if any control character differs from the defaults. Therefore, parsing an edi@energy interchange without a UNA-segment is possible and results in errors.
I suggest we allow the injection of a preconfigured
Parser
in the creation methodsFileSourcableMixin.from_file
andAbstractSegmentsContainer.from_str
, as well as modify theParser
to respect the following order of control characters:parse
This would have different benefits:
Parser
objectsI try to draft a PR for the latter one as soon as possible, but as this would be a new feature, I think we should keep it separately, for now. :)