codecvt is deprecated in C++17 and we don't really need all of its heavy machinery for simply converting to UTF-8.