libccc.h
説明を見る。00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #ifndef __LIBCCC_H__
00012 #define __LIBCCC_H__
00013
00014 #ifdef __cplusplus
00015 extern "C" {
00016 #endif
00017
00018 typedef unsigned short cccUCS2;
00019 typedef unsigned char cccCode;
00020
00021
00022 #define CCC_CP000 0x00 //ASCII
00023 #define CCC_CP437 0x01 //US
00024 #define CCC_CP850 0x05 //Multilingual Latin I
00025 #define CCC_CP866 0x0b //Russian
00026 #define CCC_CP932 0x0d //S-JIS
00027 #define CCC_CP936 0x0e //GBK
00028 #define CCC_CP949 0x0f //Korean
00029 #define CCC_CP950 0x10 //Big5
00030 #define CCC_CP1251 0x12 //Cyrillic
00031 #define CCC_CP1252 0x13 //Latin II
00032 #define CCC_CPUTF8 0xff //UTF-8
00033 #define CCC_N_CP 0x14 //number of codepages (for array definition)
00034
00035
00036 #define CCC_SUCCESS 0x00000000
00037 #define CCC_ERROR_BUFFER_SIZE 0x80000104
00038 #define CCC_ERROR_INPUT_STREAM 0x80000108
00039 #define CCC_ERROR_MEM_ALLOC 0x800200D9
00040 #define CCC_ERROR_FILE_READ 0x80020130
00041 #define CCC_ERROR_UNSUPPORTED 0x80020325
00042
00043
00044 int cccStrlenSJIS(cccCode const * str);
00045 int cccStrlenGBK(cccCode const * str);
00046 int cccStrlenKOR(cccCode const * str);
00047 int cccStrlenBIG5(cccCode const * str);
00048 int cccStrlenUTF8(cccCode const * str);
00049 int cccStrlenCode(cccCode const * str, unsigned char cp);
00050 int cccStrlenUCS2(cccUCS2 const * str);
00051
00052 int cccSJIStoUCS2(cccUCS2 * dst, size_t count, cccCode const * str);
00053 int cccGBKtoUCS2 (cccUCS2 * dst, size_t count, cccCode const * str);
00054 int cccKORtoUCS2 (cccUCS2 * dst, size_t count, cccCode const * str);
00055 int cccBIG5toUCS2(cccUCS2 * dst, size_t count, cccCode const * str);
00056 int cccUTF8toUCS2(cccUCS2 * dst, size_t count, cccCode const * str);
00057
00058 cccUCS2 cccSetErrorCharUCS2(cccUCS2 code);
00059
00060 void cccShutDown(void);
00061
00062 #ifdef __cplusplus
00063 }
00064 #endif // __cplusplus
00065
00066 #endif // __LIBCCC_H__