>
<div class="section"><p>Uses the UTF byte-order-mark (BOM) to determine UTF encoding. If there is no BOM
 at the beginning of array, UTF-8 is assumed (this is compatible with ASCII). The
 BOM, if any, will be removed from the buffer.
</p>
<p> If the encoding is determined to be UTF-16 or UTF-32 and there aren't enough bytes
 for the last code unit (i.e. if array.length is odd for UTF-16 or not divisible by
 4 for UTF-32), the extra bytes (1 for UTF-16, 1-3 for UTF-32) are stripped.
</p>
<p> Note that this