[imported from SourceForge]
Originally submitted by mmajis on 2006-05-05 02:30.
If I take an XFA PDF, remove the XFA form, rename one
of the AcroForm fields and open the resulting PDF in
Acrobat, the field name is garbled.
To begin with, it seems the field name is UTF-16BE
encoded. PDFBox writes the new /T entry in ISO-8859-1
since it finds no character values larger than 255. if
I change the source code to write UTF-16BE with the two
prefix bytes 0xFF and 0xFE (not sure of the byte order
here), the field name shows correctly in Acrobat.