--- rxvt-unicode/src/encoding.C 2004/08/04 03:29:28 1.18 +++ rxvt-unicode/src/encoding.C 2007/10/31 09:55:23 1.26 @@ -1,9 +1,9 @@ -/*--------------------------------*-C-*---------------------------------* +/*----------------------------------------------------------------------* * File: encoding.C *----------------------------------------------------------------------* * * All portions of code are copyright by their respective author/s. - * Copyright (c) 2003-2004 Marc Lehmann + * Copyright (c) 2003-2006 Marc Lehmann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -49,24 +49,25 @@ { "ISO885915", CS_ISO8859_15 }, { "FCD885915", CS_ISO8859_15 }, { "ISO885916", CS_ISO8859_16 }, - + { "TIS620*", CS_ISO8859_11 }, // close enough { "ISO10646*", CS_UNICODE }, { "UNICODE", CS_UNICODE }, { "UTF8", CS_UNICODE }, - + { "ASCII", CS_US_ASCII }, { "USASCII", CS_US_ASCII }, { "ANSIX341968", CS_US_ASCII }, - - { "KOI8R", CS_KOI8_R }, + { "ISO646.1991-IRV", CS_US_ASCII }, // older versions used the currency sign + + { "KOI8R*", CS_KOI8_R }, { "GOST1976874*", CS_KOI8_R }, { "KOI8RU", CS_KOI8_U }, { "KOI8U", CS_KOI8_U }, { "VISCII*", CS_VISCII }, - + { "JISX0201*", CS_JIS0201_1976_0 }, { "JISC6226*", CS_JIS0208_1990_0 }, // also wrongly matches -1987-0? (check Encode::JP) { "JISX0208*", CS_JIS0208_1990_0 }, // also wrongly matches -1987-0? (check Encode::JP) @@ -74,15 +75,16 @@ { "JISX021320001", CS_JIS0213_1 }, { "JISX021320002", CS_JIS0213_2 }, { "JISX0221*", CS_UNICODE }, // _very_ close - + { "KSC5601*", CS_KSC5601_1987_0 }, { "KSX1001*", CS_KSC5601_1987_0 }, { "KSC5700*", CS_UNICODE }, // unicode plus extensions - + { "BIG5P*", CS_BIG5_PLUS }, { "BIG5ETEN*", CS_BIG5_EXT }, { "BIG5*", CS_BIG5 }, { "GB2312*", CS_GB2312_1980_0 }, + { "GBK*", CS_GBK_0 }, { "GB6345*", CS_GB2312_1980_0 }, // slightly different to gb2312?? { "GB8565*", CS_GB2312_1980_0 }, // a superset of gb2312?? { "GB13000*", CS_UNICODE }, @@ -179,12 +181,13 @@ #include "table/ksc5601_1987_0.h" -//#define ENCODING_CN +//#define ENCODING_ZH -#include "table/gb2312_1980_0.h" #include "table/big5.h" +#include "table/gbk_0.h" +#include "table/gb2312_1980_0.h" -//#define ENCODING_CN_EXT +//#define ENCODING_ZH_EXT #include "table/cns11643_1992_1.h" #include "table/cns11643_1992_2.h" @@ -217,7 +220,7 @@ #else # define ENC(base) { cs_ ## base ## _from_unicode } #endif - + // order must match table in encoding.h(!) const rxvt_codeset_conv rxvt_codeset[NUM_CODESETS] = { @@ -254,6 +257,7 @@ ENC (ksc5601_1987_0), ENC (gb2312_1980_0), + ENC (gbk_0), ENC (cns11643_1992_1), ENC (cns11643_1992_2), @@ -306,5 +310,6 @@ bool unicode::is_space (unicode_t c) { - return IS_SPACE (c); + return IS_SPACE (c) + || c == 0x09; // exclude tabs, too, as we store them in the buffer }