init
This commit is contained in:
14
include/encoding/CharTableGBK.hpp
Normal file
14
include/encoding/CharTableGBK.hpp
Normal 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
|
14
include/encoding/CharTableUTF8.hpp
Normal file
14
include/encoding/CharTableUTF8.hpp
Normal 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
|
26
include/encoding/EncodingUtils.hpp
Normal file
26
include/encoding/EncodingUtils.hpp
Normal 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
|
Reference in New Issue
Block a user