Converting files to UTF-8 without BOM in ANT

In the process of upgrading 10G BPEL proces to 11G composites we encountered "Content is not allowed in prolog. ORABPEL-01501" and "XML-20109: (Fatal Error) PI with the name 'xml' can occur only in the beginning of the document." errors. Major cause is that the original BPEL processes do contain schemas delivered by external organizations in a variety of encodings. Some of them did contain within the encoding not allowed characters which were accepted in 10g but do not pass the more strict validation of schemas in 11g. To forestall most of these issues i wrote the folioing ANT target which is called during the upgrade process to correct most (not all!) of these file encoding issues.


Read More...
Comments