See DFDL-1369 for context. We currently map any illegal XML char to a value in the PUA (Private Use Area) on parse, then map it back to the illegal char on unparse. However, if you attempt to unparse an actual PUA value, Daffodill incorrectly maps it back to an illegal character.
See tests:
test_puaInfosetChars_03
test_puaInfosetChars_04
in the following files:
daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section00/general/testUnparserGeneral.tdml
daffodil-test/src/test/scala-debug/edu/illinois/ncsa/daffodil/section00/general/TestUnparserGeneralDebug.scala
daffodil-test/src/test/scala/edu/illinois/ncsa/daffodil/section00/general/TestUnparserGeneral.scala