如果我的程序只能处理 Unicode 编码的文件,我是否可以认为如果没有 BOM,编码是没有 BOM 的 UTF-8?

If my program will work ONLY with Unicode encoded files, can I consider that if BOM is not presented, encoding is UTF-8 without BOM?

我的问题是"Are UTF-16 and UTF-32 encoded files considered correct if BOM is not presented?"

我对其进行了研究,发现 BOM 对于 UTF-16 和 UTF-32 是可选的,如果没有提供 BOM,向用户询问编码是一种很好的做法。 我从这个 article 得到了信息。