OS4X plugin os4xplugin utf8 bom check

From OS4X
Jump to navigation Jump to search

Purpose

Verify every XML file of the job to have a valid UTF-8 BOM header contained in the file. The BOM header for UTF-8 is the following three bytes sequence:

0xEF 0xBB 0xBF

If any of the XML files doesn't contain the BOM header, the job aborts instantly.

Requirements

  • OS4X Enterprise license

Configuration

  • Check any filetype, not only XML: if enabled, not only XML documents will be checked if the BOM header is present.
  • Add required BOM instead of aborting job: If enabled, the required BOM header will be added to the file. Beware: this is a RAM intensive task, holding the complete file in memory!

Remarks

Only files which can be interpreted correctly as XML will be verified, other files will be ignored. The suffix of the file doesn't count, only the content.