This commit is contained in:
ecpvint
2024-08-15 18:40:30 +08:00
commit 4485f045ca
552 changed files with 147047 additions and 0 deletions

View File

@ -0,0 +1,14 @@
#ifndef CHARTABLEGBK_HPP
#define CHARTABLEGBK_HPP
class CharTableGBK{
public:
static const unsigned int GBKTable_size=22645;
static const unsigned short GBKTable[GBKTable_size];
};
#endif // CHARTABLEGBK_HPP

View File

@ -0,0 +1,14 @@
#ifndef CHARTABLEUTF8_HPP
#define CHARTABLEUTF8_HPP
class CharTableUTF8{
public:
static const unsigned int UTF8Table_size=22645;
static const unsigned int UTF8Table[UTF8Table_size];
};
#endif // CHARTABLEUTF8_HPP

View File

@ -0,0 +1,26 @@
#ifndef ENCODINGUTILS_HPP
#define ENCODINGUTILS_HPP
class EncodingUtils{
public:
static char* convertUTF8toGBK(const char* str);
static char* convertGBKtoUTF8(const char* str);
static unsigned int getUTF8TableSize();
static char* getUTF8TableElement(unsigned int index);
static unsigned int getGBKTableSize();
static char* getGBKTableElement(unsigned int index);
static unsigned int getUTF8CharLength(char header);
static unsigned int getGBKCharLength(char header);
};
#endif