fix: windows build failure in UTF-16 conversion (#499)

This commit is contained in:
Ali Almohaya authored and GitHub committed 2026-09-07 11:52:22 +04:00
1 parent 2097ebb414
commit 27ee6f02d6
1 file changed
+4 -1
+4 -1
View File
@@ -317,8 +317,11 @@ inline std::string SafeCsv(std::string_view text) {
}
inline std::string Utf16ToUtf8(std::u16string_view utf16) {
if (utf16.empty()) {
return {};
}
std::wstring_convert<std::codecvt_utf8_utf16<char16_t>, char16_t> convert;
return convert.to_bytes(utf16.begin(), utf16.end());
return convert.to_bytes(utf16.data(), utf16.data() + utf16.size());
}
inline ByteBuffer HexToBin(std::string_view text) {