Return -1 if no BOM and otherwise read the BOM and return it.
If there is no BOM or if bytes beyond the BOM are read then the bytes read
are pushed back onto the ungetc buffer or ungetcw buffer.
Pass ungetCharSize == 2 to use
ungetcw instead of ungetc when no BOM is present.
Return -1 if no BOM and otherwise read the BOM and return it.
If there is no BOM or if bytes beyond the BOM are read then the bytes read are pushed back onto the ungetc buffer or ungetcw buffer. Pass ungetCharSize == 2 to use ungetcw instead of ungetc when no BOM is present.