diff --git a/lib/src/gear/string_utils.h b/lib/src/gear/string_utils.h index 6d01fc50..4475c491 100644 --- a/lib/src/gear/string_utils.h +++ b/lib/src/gear/string_utils.h @@ -49,53 +49,6 @@ char** stringSplit(const char* s, const char delimiter); char** stringSplit(const char* s, const char delimiter, u_int16_t resultBaseSize, u_int16_t resultIncSize); std::vector stringSplit(const std::string s, const std::string regexDelimiter); -#if defined(_WIN32) -static inline std::string stringToUtf8(std::string& codepage_str) -{ - int size = MultiByteToWideChar( - CP_ACP, MB_COMPOSITE, - codepage_str.c_str(), - codepage_str.length(), - nullptr, - 0); - - std::wstring utf16_str(size, '\0'); - MultiByteToWideChar( - CP_ACP, - MB_COMPOSITE, - codepage_str.c_str(), - codepage_str.length(), - &utf16_str[0], - size); - - int utf8_size = WideCharToMultiByte( - CP_UTF8, - 0, - utf16_str.c_str(), - utf16_str.length(), - nullptr, - 0, - nullptr, - nullptr); - std::string utf8_str(utf8_size, '\0'); - WideCharToMultiByte( - CP_UTF8, - 0, utf16_str.c_str(), - utf16_str.length(), - &utf8_str[0], - utf8_size, - nullptr, - nullptr); - - return utf8_str; -} -#elif defined(__APPLE__) -static inline std::string stringToUtf8(std::string& codepage_str) -{ - return codepage_str; -} -#endif - /** * @brief Normalizes a string to NCName. *