You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
997 B
C

1 month ago
//////////////////////////////////////////////////////////////////////////////
//<2F>ļ<EFBFBD> ChineseCode.h
//<2F><>Ҫ<EFBFBD><D2AA><EFBFBD><EFBFBD>:
// <09><><EFBFBD><EFBFBD>GB2312<31><32>UTF-8<><38><EFBFBD>뻥ת
//
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>д: 2006-3-08
/////////////////////////////////////////////////////////////////////////////
#if !defined(__CCHINESECODELIB_H_)
#define __CCHINESECODELIB_H_
class AFX_EXT_CLASS CChineseCode
{
public:
CChineseCode();
virtual ~CChineseCode();
static CString UTF_8ToGB2312(char *pText, int pLen);
static CString GB2312ToUTF_8(char *pText, int pLen);
static void UnicodeToUTF_8(char* pOut,WCHAR* pText); // Unicode ת<><D7AA><EFBFBD><EFBFBD>UTF-8
static void UTF_8ToUnicode(WCHAR* pOut,char* pText); // <20><>UTF-8ת<38><D7AA><EFBFBD><EFBFBD>Unicode
static void Gb2312ToUnicode(WCHAR* pOut,char *gbBuffer); // GB2312 ת<><D7AA><EFBFBD>ɡ<EFBFBD>Unicode
static void UnicodeToGB2312(char* pOut,unsigned short uData); // <20><>Unicode ת<><D7AA><EFBFBD><EFBFBD> GB2312
static CStringW UTF8toUTF16(const CStringA& utf8);
static CStringA UTF16toUTF8(const CStringW& utf16);
};
#endif // !defined(__CCHINESECODELIB_H_)