>>362
Visual C++限定だが

auto f = std:: fopen(R"(c:\bom.txt)", "r, ccs=UTF-8");
if (f == nullptr)
 throw "oops...";
wchar_t buf[100];
fgewts(buf, 100, f); //BOMは読み飛ばされる