Ruby
2.0.0p247(2013-06-27revision41674)
|
00001 /* 00002 * utf8tbl.h - Header file for Convertion Table 00003 * 00004 * $Id: utf8tbl.h 37800 2012-11-22 08:47:30Z naruse $ 00005 */ 00006 00007 #ifndef _UTF8TBL_H_ 00008 #define _UTF8TBL_H_ 00009 00010 #ifdef UTF8_OUTPUT_ENABLE 00011 #define sizeof_euc_to_utf8_1byte 94 00012 #define sizeof_euc_to_utf8_2bytes 94 00013 extern const unsigned short euc_to_utf8_1byte[]; 00014 extern const unsigned short *const euc_to_utf8_2bytes[]; 00015 extern const unsigned short *const euc_to_utf8_2bytes_ms[]; 00016 extern const unsigned short *const euc_to_utf8_2bytes_mac[]; 00017 extern const unsigned short *const euc_to_utf8_2bytes_x0213[]; 00018 extern const unsigned short *const x0212_to_utf8_2bytes[]; 00019 extern const unsigned short *const x0212_to_utf8_2bytes_x0213[]; 00020 #define sizeof_x0213_combining_chars 5 00021 #define sizeof_x0213_combining_table 25 00022 #define sizeof_x0213_1_surrogate_table 26 00023 #define sizeof_x0213_2_surrogate_table 277 00024 extern const unsigned short x0213_combining_chars[sizeof_x0213_combining_chars]; 00025 extern const unsigned short x0213_combining_table[sizeof_x0213_combining_table][3]; 00026 extern const unsigned short x0213_1_surrogate_table[sizeof_x0213_1_surrogate_table][3]; 00027 extern const unsigned short x0213_2_surrogate_table[sizeof_x0213_2_surrogate_table][3]; 00028 #endif /* UTF8_OUTPUT_ENABLE */ 00029 00030 #ifdef UTF8_INPUT_ENABLE 00031 #define sizeof_utf8_to_euc_C2 64 00032 #define sizeof_utf8_to_euc_E5B8 64 00033 #define sizeof_utf8_to_euc_2bytes 112 00034 #define sizeof_utf8_to_euc_3bytes 16 00035 extern const unsigned short *const utf8_to_euc_2bytes[]; 00036 extern const unsigned short *const utf8_to_euc_2bytes_ms[]; 00037 extern const unsigned short *const utf8_to_euc_2bytes_932[]; 00038 extern const unsigned short *const utf8_to_euc_2bytes_mac[]; 00039 extern const unsigned short *const utf8_to_euc_2bytes_x0213[]; 00040 extern const unsigned short *const *const utf8_to_euc_3bytes[]; 00041 extern const unsigned short *const *const utf8_to_euc_3bytes_ms[]; 00042 extern const unsigned short *const *const utf8_to_euc_3bytes_932[]; 00043 extern const unsigned short *const *const utf8_to_euc_3bytes_mac[]; 00044 extern const unsigned short *const *const utf8_to_euc_3bytes_x0213[]; 00045 #endif /* UTF8_INPUT_ENABLE */ 00046 00047 #ifdef UNICODE_NORMALIZATION 00048 00049 #define NORMALIZATION_TABLE_LENGTH 942 00050 #define NORMALIZATION_TABLE_NFC_LENGTH 3 00051 #define NORMALIZATION_TABLE_NFD_LENGTH 9 00052 struct normalization_pair { 00053 const unsigned char nfc[NORMALIZATION_TABLE_NFC_LENGTH]; 00054 const unsigned char nfd[NORMALIZATION_TABLE_NFD_LENGTH]; 00055 }; 00056 extern const struct normalization_pair normalization_table[]; 00057 #endif 00058 00059 #ifdef SHIFTJIS_CP932 00060 #define CP932_TABLE_BEGIN 0xFA 00061 #define CP932_TABLE_END 0xFC 00062 extern const unsigned short shiftjis_cp932[3][189]; 00063 #define CP932INV_TABLE_BEGIN 0xED 00064 #define CP932INV_TABLE_END 0xEE 00065 extern const unsigned short cp932inv[2][189]; 00066 #endif /* SHIFTJIS_CP932 */ 00067 00068 #ifdef X0212_ENABLE 00069 extern const unsigned short shiftjis_x0212[3][189]; 00070 extern const unsigned short *const x0212_shiftjis[]; 00071 #endif /* X0212_ENABLE */ 00072 00073 #endif 00074