诸暨麻将添加redis
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

19 lines
689 B

  1. #pragma once
  2. #include <string>
  3. class CChineseCode
  4. {
  5. public:
  6. CChineseCode();
  7. ~CChineseCode();
  8. public:
  9. static void UTF_8ToUnicode(wchar_t* pOut, char *pText); // 把UTF-8转换成Unicode
  10. static void UnicodeToUTF_8(char* pOut, wchar_t* pText); //Unicode 转换成UTF-8
  11. static void UnicodeToGB2312(char* pOut, wchar_t uData); // 把Unicode 转换成 GB2312
  12. static void Gb2312ToUnicode(wchar_t* pOut, char *gbBuffer);// GB2312 转换成 Unicode
  13. static void GB2312ToUTF_8(std::string& pOut, char *pText, int pLen);//GB2312 转为 UTF-8
  14. static void UTF_8ToGB2312(std::string &pOut, char *pText, int pLen);//UTF-8 转为 GB2312
  15. static CStringW Utf8ToUnicode(const char* buf);
  16. };