I'v solved the problem by converting UTF8 std::string to std::filesystem::path and then send it to the std::ifstream constructor (Windows 10, MSYS2, GCC, C++17):
std::filesystem::path xpath(file_name);
std::ifstream xstream(xpath);
Works fine with non-ASCII characters in file_name string.