Toad is a code analyzer which take source files as input, and output an XML report with the violations found in the input files.
The XML report also includes the source file's original input for some reason.
It is not possible to specify the encoding of the source files that Toad must analyze. It is able somehow to automagically figure out the right encoding.
Some parts of the XML report will be encoded in UTF-8, but the part where the original code is to be found will keep the original file encoding.
This means that there can be multiple encodings used in the XML report, making it impossible to load with XML parsers which all expect the file to have a single encoding.
Therefore, the XML report must first be preprocessed in order to filter out any non-ASCII byte, so that the XML parser will always be able to parse with ASCII as encoding.