Description
The unparser test case below fails.
The output is "0000000-1" which is clearly wrong. The padding should be after the sign.
Interestingly same bug appears in IBM DFDL (who asked us to see if it also is in Daffodil), which suggests rather strongly this may be an issue in the ICU library.
<tdml:defineSchema name="dfdlwg1" elementFormDefault="unqualified"> <xs:include schemaLocation="org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd"/> <dfdl:format ref="ex:GeneralFormat" lengthKind="delimited"/> <xs:element name="r" type="ex:numeric9_custom1"/> <xs:simpleType dfdl:textNumberPattern="#0" dfdl:textOutputMinLength="9" dfdl:textPadKind="padChar" dfdl:textTrimKind="padChar" name="numeric9_custom1" dfdl:textNumberPadCharacter="0"> <xs:restriction base="xsd:decimal"> <xs:totalDigits value="9"/> </xs:restriction> </xs:simpleType> </tdml:defineSchema> <tdml:unparserTestCase name="textNumberPattern1" model="dfdlwg1"> <tdml:document><![CDATA[-00000001]]></tdml:document> <tdml:infoset><tdml:dfdlInfoset> <ex:r>-1</ex:r> </tdml:dfdlInfoset></tdml:infoset> </tdml:unparserTestCase>