Closed tophsic closed 7 years ago
I wanted to write a test to use a different decimal separator but I am not familiar enough with UN/EDIFACT format :disappointed:
I get the same error here, I'll look into your fix.
You can use a different decimal separator by specifying it in the UNA header. Or set it manually in the Configuration object.
I manage to change decimal separator in the UNA header (using fix in my PR) but I just did not manage to write a test on this case.
I see, for this to work you need to include a number component and make sure it's being parsed as a number. So you should include the corresponding segment and element definitions. For example:
validator.define({
'QVR': { requires: 0, elements: ['C279', '4221', 'C960'] }
});
validator.define({
'C279': { requires: 1, components: ['n..15', 'an..3'] }
});
Hi,
On development branch with node 7.2.0, tests suite fail on 'Parser.write should use special characters as defined in the UNA header'.
As I was looking why, I suppose this is because Tokenizer is instantiated before settings configuration from UNA header and take default Configuration settings.
Do you have any idea how to solve this ?