1 | /*--------------------------------*-C-*---------------------------------* |
1 | /*----------------------------------------------------------------------* |
2 | * File: encoding.C |
2 | * File: encoding.C |
3 | *----------------------------------------------------------------------* |
3 | *----------------------------------------------------------------------* |
4 | * |
4 | * |
5 | * All portions of code are copyright by their respective author/s. |
5 | * All portions of code are copyright by their respective author/s. |
6 | * Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com> |
6 | * Copyright (c) 2003-2006 Marc Lehmann <pcg@goof.com> |
7 | * |
7 | * |
8 | * This program is free software; you can redistribute it and/or modify |
8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by |
9 | * it under the terms of the GNU General Public License as published by |
10 | * the Free Software Foundation; either version 2 of the License, or |
10 | * the Free Software Foundation; either version 2 of the License, or |
11 | * (at your option) any later version. |
11 | * (at your option) any later version. |
… | |
… | |
57 | { "UTF8", CS_UNICODE }, |
57 | { "UTF8", CS_UNICODE }, |
58 | |
58 | |
59 | { "ASCII", CS_US_ASCII }, |
59 | { "ASCII", CS_US_ASCII }, |
60 | { "USASCII", CS_US_ASCII }, |
60 | { "USASCII", CS_US_ASCII }, |
61 | { "ANSIX341968", CS_US_ASCII }, |
61 | { "ANSIX341968", CS_US_ASCII }, |
|
|
62 | { "ISO646.1991-IRV", CS_US_ASCII }, // older versions used the currency sign |
62 | |
63 | |
63 | { "KOI8R", CS_KOI8_R }, |
64 | { "KOI8R*", CS_KOI8_R }, |
64 | { "GOST1976874*", CS_KOI8_R }, |
65 | { "GOST1976874*", CS_KOI8_R }, |
65 | { "KOI8RU", CS_KOI8_U }, |
66 | { "KOI8RU", CS_KOI8_U }, |
66 | { "KOI8U", CS_KOI8_U }, |
67 | { "KOI8U", CS_KOI8_U }, |
67 | |
68 | |
68 | { "VISCII*", CS_VISCII }, |
69 | { "VISCII*", CS_VISCII }, |
… | |
… | |
81 | |
82 | |
82 | { "BIG5P*", CS_BIG5_PLUS }, |
83 | { "BIG5P*", CS_BIG5_PLUS }, |
83 | { "BIG5ETEN*", CS_BIG5_EXT }, |
84 | { "BIG5ETEN*", CS_BIG5_EXT }, |
84 | { "BIG5*", CS_BIG5 }, |
85 | { "BIG5*", CS_BIG5 }, |
85 | { "GB2312*", CS_GB2312_1980_0 }, |
86 | { "GB2312*", CS_GB2312_1980_0 }, |
|
|
87 | { "GBK*", CS_GBK_0 }, |
86 | { "GB6345*", CS_GB2312_1980_0 }, // slightly different to gb2312?? |
88 | { "GB6345*", CS_GB2312_1980_0 }, // slightly different to gb2312?? |
87 | { "GB8565*", CS_GB2312_1980_0 }, // a superset of gb2312?? |
89 | { "GB8565*", CS_GB2312_1980_0 }, // a superset of gb2312?? |
88 | { "GB13000*", CS_UNICODE }, |
90 | { "GB13000*", CS_UNICODE }, |
89 | { "CNS1164319921", CS_CNS11643_1992_1 }, |
91 | { "CNS1164319921", CS_CNS11643_1992_1 }, |
90 | { "CNS1164319922", CS_CNS11643_1992_2 }, |
92 | { "CNS1164319922", CS_CNS11643_1992_2 }, |
… | |
… | |
177 | |
179 | |
178 | //#define ENCODING_KR |
180 | //#define ENCODING_KR |
179 | |
181 | |
180 | #include "table/ksc5601_1987_0.h" |
182 | #include "table/ksc5601_1987_0.h" |
181 | |
183 | |
182 | //#define ENCODING_CN |
184 | //#define ENCODING_ZH |
183 | |
185 | |
|
|
186 | #include "table/big5.h" |
|
|
187 | #include "table/gbk_0.h" |
184 | #include "table/gb2312_1980_0.h" |
188 | #include "table/gb2312_1980_0.h" |
185 | #include "table/big5.h" |
|
|
186 | |
189 | |
187 | //#define ENCODING_CN_EXT |
190 | //#define ENCODING_ZH_EXT |
188 | |
191 | |
189 | #include "table/cns11643_1992_1.h" |
192 | #include "table/cns11643_1992_1.h" |
190 | #include "table/cns11643_1992_2.h" |
193 | #include "table/cns11643_1992_2.h" |
191 | #include "table/cns11643_1992_3.h" |
194 | #include "table/cns11643_1992_3.h" |
192 | #include "table/cns11643_1992_4.h" |
195 | #include "table/cns11643_1992_4.h" |
… | |
… | |
252 | ENC (jis0213_2), |
255 | ENC (jis0213_2), |
253 | |
256 | |
254 | ENC (ksc5601_1987_0), |
257 | ENC (ksc5601_1987_0), |
255 | |
258 | |
256 | ENC (gb2312_1980_0), |
259 | ENC (gb2312_1980_0), |
|
|
260 | ENC (gbk_0), |
257 | |
261 | |
258 | ENC (cns11643_1992_1), |
262 | ENC (cns11643_1992_1), |
259 | ENC (cns11643_1992_2), |
263 | ENC (cns11643_1992_2), |
260 | ENC (cns11643_1992_3), |
264 | ENC (cns11643_1992_3), |
261 | ENC (cns11643_1992_4), |
265 | ENC (cns11643_1992_4), |