| 137 | } |
| 138 | |
| 139 | std::string WideStringToUTF8Internal(const std::wstring& source) { |
| 140 | std::string s; |
| 141 | #if WCHAR_MAX > 0xFFFF |
| 142 | ::utf8::utf32to8(source.begin(), source.end(), std::back_inserter(s)); |
| 143 | #else |
| 144 | ::utf8::utf16to8(source.begin(), source.end(), std::back_inserter(s)); |
| 145 | #endif |
| 146 | return s; |
| 147 | } |
| 148 | |
| 149 | std::string UTF16StringToUTF8Internal(std::u16string_view source) { |
| 150 | std::string s; |
no test coverage detected