Multi-byte order options

Use byte order mark and Generate byte order mark are always valid and may be selected in any combination. Some combinations of settings may seem nonsensical. For example, selecting Generate byte order mark with Big5 encoding does not have any effect. These are permitted as they do no harm and are difficult to prevent.

If any unicode encoding or XML is selected, then it looks for a BOM. If the user selection does not contain UTF-8 or XML is unchecked, then it does not look for the BOM.

If the BOM is found, then it overrides XML and the user selection. If no BOM is found and XML is selected, then it looks for the XML encoding. If XML is not checked, then it defaults to the user selection. If no user selection exists, then it is UTF-8.

The order is BOM > XML > user.