MCPcopy Create free account
hub / github.com/antirez/llama.cpp-deepseek-v4-flash / wide_to_utf8

Function wide_to_utf8

tools/server/server-models.cpp:108–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106
107#ifdef _WIN32
108static std::string wide_to_utf8(const wchar_t * ws) {
109 if (!ws || !*ws) {
110 return {};
111 }
112
113 const int len = static_cast<int>(std::wcslen(ws));
114 const int bytes = WideCharToMultiByte(CP_UTF8, 0, ws, len, nullptr, 0, nullptr, nullptr);
115 if (bytes == 0) {
116 return {};
117 }
118
119 std::string utf8(bytes, '\0');
120 WideCharToMultiByte(CP_UTF8, 0, ws, len, utf8.data(), bytes, nullptr, nullptr);
121
122 return utf8;
123}
124#endif
125
126static std::vector<std::string> get_environment() {

Callers 1

get_environmentFunction · 0.85

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected