Detecting BOM with non-UTF encoding
Currently, "bom|" encoding prefix to
File.open is ignored if the encoding name is not a UTF.
But one usage of BOM is to tell if the stream is a UTF or not, and especially common on Windows, e.g. UTF-16LE or OEMCP.
So I think this restriction should be removed.