BomToUtf8$

Takes one parameter

Description:

Inspects the first few bytes of source to look for a Byte Order Mask (BOM), and if found removes the BOM, and if required converts the source to UTF-8.

This function only supports the conversion of ANSI (no BOM) and UTF-16LE. When a UTF-8 BOM is found the source is not converted but the BOM will be removed.

BOM Values:

UTF-8: EF BB BF
UTF-16BE: (Big Endian) FE FF
UTF-16LE: (Little Endian) FF FE
UTF-32BE: (Big Endian) 00 00 FE FF
UTF-32LE: (Little Endian) FF FE 00 00