I  think you are correct that as far as matching delimiters goes, you can't 
tell the difference between a non-match, and a decode-error during the attempt 
to match.

Daffodil doesn't implement encodingErrorPolicy='error' because it turns out to 
be quite hard to implement and people have gotten away without it so we've 
given other things priority.


________________________________
From: Costello, Roger L. <[email protected]>
Sent: Friday, April 10, 2020 2:09 PM
To: [email protected] <[email protected]>
Subject: Why is encodingPolicy relevant for separators?


Hi Folks,



In my DFDL schema I specify a separator. And I specify the encoding of that 
separator.



Either the input has the separator or it doesn’t. That is, either the input 
contains the appropriate bytes (per the encoding) or it doesn’t.



If the input has the separator in the wrong encoding, well, then the input 
doesn’t have the separator. Right?



It seems to me that encodingPolicy is irrelevant. Consider, 
encodingPolicy=error means to throw an error if the separator has the wrong 
encoding. Huh? It’s impossible for there to be a separator in the wrong 
encoding – either there are bytes in the input corresponding to the separator 
or there isn’t. Right?



Why is encodingPolicy relevant for separators?



/Roger

Reply via email to