-
Improvement
-
Resolution: Fixed
-
Normal
-
s11
-
None
In order to test data containing the us-ascii-7-bit-packed encoding, such as data conforming to MIL-STD-2045-47001D, it must be convenient to create strings in the data.
A new keyword on tdml:documentPart element, encoding, is needed, and is usable when the type attribute is "text" (which is the default).
Example:
<documentPart type="text" encoding="us-ascii-7-bit-packed"><![CDATA[abcdefgh]]></documentPart>
In this case, each of the abcdefgh would be converted to a single character, occupying exactly 7 bits. The whole string occupies 7 bytes, or 56 bits. In this case the overall string is a multiple of 8-bits in total length, but this should not be required. Text in this encoding can begin on any bit boundary, and occupy any multiple of 7 bits in length.
Other encodings, such as UTF-16, UTF-32, can also be better exercised in this way.
Note that this encoding should not assume bit ordering. See DFDL-896 and DFDL-897.
Specifically, some data formats use us-ascii-7-bit-packed, and also use bit order of least-significant-bit-first.