27 lines
584 B
C++
27 lines
584 B
C++
|
#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
|