12345678910111213141516171819202122232425262728293031 |
- #pragma once
- #include <iostream>
- #include <string>
- #include <windows.h>
- using namespace std;
- class strCoding
- {
- public:
- strCoding(void);
- ~strCoding(void);
- static void UTF_8ToGB2312(string &pOut, char *pText, int pLen);
- static void GB2312ToUTF_8(string& pOut, char *pText, int pLen);
- static string UrlGB2312(char * str);
- static string UrlUTF8(char * str);
- static string UrlUTF8Decode(string str);
- static string UrlGB2312Decode(string str);
- private:
- static void Gb2312ToUnicode(WCHAR* pOut, char *gbBuffer);
- static void UTF_8ToUnicode(WCHAR* pOut, char *pText);
- static void UnicodeToUTF_8(char* pOut, WCHAR* pText);
- static void UnicodeToGB2312(char* pOut, WCHAR uData);
- static char CharToInt(char ch);
- static char StrToBin(char *str);
- };
|