| 439 | } |
| 440 | |
| 441 | fmt::internal::UTF16ToUTF8::UTF16ToUTF8(fmt::WStringRef s) { |
| 442 | if (int error_code = convert(s)) { |
| 443 | FMT_THROW(WindowsError(error_code, |
| 444 | "cannot convert string from UTF-16 to UTF-8")); |
| 445 | } |
| 446 | } |
| 447 | |
| 448 | int fmt::internal::UTF16ToUTF8::convert(fmt::WStringRef s) { |
| 449 | int length = WideCharToMultiByte(CP_UTF8, 0, s.c_str(), -1, 0, 0, 0, 0); |
nothing calls this directly
no test coverage detected