diff --git a/Encrypt/SecureHashAlgorithm.h b/Encrypt/SecureHashAlgorithm.h index 2e41f9e..9a40cea 100644 --- a/Encrypt/SecureHashAlgorithm.h +++ b/Encrypt/SecureHashAlgorithm.h @@ -3,6 +3,7 @@ #include #include +#include class SecureHashAlgorithmPrivate; diff --git a/Universal/StringUtility.cpp b/Universal/StringUtility.cpp index 17b7acb..57f3dba 100644 --- a/Universal/StringUtility.cpp +++ b/Universal/StringUtility.cpp @@ -97,6 +97,7 @@ slow: } std::string UTF8ToGBK(const std::string &utf8Str) { +#ifdef WIN32 int wideStrLen = MultiByteToWideChar(CP_UTF8, 0, utf8Str.c_str(), -1, NULL, 0); if (wideStrLen == 0) { return ""; @@ -112,8 +113,11 @@ std::string UTF8ToGBK(const std::string &utf8Str) { std::string gbkStr(gbkStrLen, 0); WideCharToMultiByte(CP_ACP, 0, wideStr.c_str(), -1, &gbkStr[0], gbkStrLen, NULL, NULL); - return gbkStr; +#else + assert(false && "not implement."); + return ""; +#endif } } // namespace StringUtility