ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/encoding.C
(Generate patch)

Comparing rxvt-unicode/src/encoding.C (file contents):
Revision 1.10 by pcg, Sun Mar 14 17:33:07 2004 UTC vs.
Revision 1.15 by pcg, Mon Mar 15 01:27:46 2004 UTC

44 { "KOI8U", CS_KOI8_U }, 44 { "KOI8U", CS_KOI8_U },
45 45
46 { "VISCII*", CS_VISCII }, 46 { "VISCII*", CS_VISCII },
47 47
48 { "JISX0201*", CS_JIS0201_1976_0 }, 48 { "JISX0201*", CS_JIS0201_1976_0 },
49 { "JISX0208*", CS_JIS0208_1983_0 }, // also wrongly matches -1990-0 (check Encode::JP) 49 { "JISX0208*", CS_JIS0208_1990_0 }, // also wrongly matches -1987-0? (check Encode::JP)
50 { "JISX0212*", CS_JIS0212_1990_0 }, 50 { "JISX0212*", CS_JIS0212_1990_0 },
51 { "JISX021320001", CS_JIS0213_1 },
52 { "JISX021320002", CS_JIS0213_2 },
51 { "JISX0221*", CS_UNICODE }, 53 { "JISX0221*", CS_UNICODE }, // _very_ close
52 54
53 { "KSC5601*", CS_KSC5601_1987_0 }, 55 { "KSC5601*", CS_KSC5601_1987_0 },
54 { "KSX1001*", CS_KSC5601_1987_0 }, 56 { "KSX1001*", CS_KSC5601_1987_0 },
55 { "KSC5700*", CS_UNICODE }, // unicode plus extensions 57 { "KSC5700*", CS_UNICODE }, // unicode plus extensions
56 58
113 115
114 return CS_UNKNOWN; 116 return CS_UNKNOWN;
115} 117}
116 118
117struct rxvt_codeset_conv_unknown : rxvt_codeset_conv { 119struct rxvt_codeset_conv_unknown : rxvt_codeset_conv {
118 uint32_t to_unicode (uint32_t enc) const { return NOCHAR; } 120 unicode_t to_unicode (uint32_t enc) const { return NOCHAR; }
119 uint32_t from_unicode (uint32_t unicode) const { return NOCHAR; } 121 uint32_t from_unicode (unicode_t unicode) const { return NOCHAR; }
120} rxvt_codeset_conv_unknown; 122} rxvt_codeset_conv_unknown;
121 123
122struct rxvt_codeset_conv_us_ascii : rxvt_codeset_conv { 124struct rxvt_codeset_conv_us_ascii : rxvt_codeset_conv {
123 uint32_t from_unicode (uint32_t unicode) const { return unicode <= 127 ? unicode : NOCHAR; } 125 uint32_t from_unicode (unicode_t unicode) const { return unicode <= 127 ? unicode : NOCHAR; }
124} rxvt_codeset_conv_us_ascii; 126} rxvt_codeset_conv_us_ascii;
125 127
126struct rxvt_codeset_conv_unicode : rxvt_codeset_conv { 128struct rxvt_codeset_conv_unicode : rxvt_codeset_conv {
127 /* transparent */ 129 /* transparent */
128} rxvt_codeset_conv_unicode; 130} rxvt_codeset_conv_unicode;
129 131
130struct rxvt_codeset_conv_unicode_16 : rxvt_codeset_conv { 132struct rxvt_codeset_conv_unicode_16 : rxvt_codeset_conv {
131 uint32_t to_unicode (uint32_t enc) const { return enc; } 133 unicode_t to_unicode (uint32_t enc) const { return enc; }
132 uint32_t from_unicode (uint32_t unicode) const { return unicode <= 65535 ? unicode : NOCHAR; } 134 uint32_t from_unicode (unicode_t unicode) const { return unicode <= 65535 ? unicode : NOCHAR; }
133} rxvt_codeset_conv_unicode_16; 135} rxvt_codeset_conv_unicode_16;
134 136
135#define ENCODING_DEFAULT 137#define ENCODING_DEFAULT
136 138
137#include "table/iso8859_1.h" 139#include "table/iso8859_1.h"
183#include "table/viscii.h" 185#include "table/viscii.h"
184 186
185//#define ENCODING_JP 187//#define ENCODING_JP
186 188
187#include "table/jis0201_1976_0.h" 189#include "table/jis0201_1976_0.h"
188#include "table/jis0208_1983_0.h" 190#include "table/jis0208_1990_0.h"
189#include "table/jis0212_1990_0.h" 191#include "table/jis0212_1990_0.h"
190 192
191//#define ENCODING_JP_EXT 193//#define ENCODING_JP_EXT
192 194
193#include "table/jis0213_1.h" 195#include "table/jis0213_1.h"
217 219
218 &rxvt_codeset_conv_koi8_r, 220 &rxvt_codeset_conv_koi8_r,
219 &rxvt_codeset_conv_koi8_u, 221 &rxvt_codeset_conv_koi8_u,
220 222
221 &rxvt_codeset_conv_jis0201_1976_0, 223 &rxvt_codeset_conv_jis0201_1976_0,
222 &rxvt_codeset_conv_jis0208_1983_0, 224 &rxvt_codeset_conv_jis0208_1990_0,
223 &rxvt_codeset_conv_jis0212_1990_0, 225 &rxvt_codeset_conv_jis0212_1990_0,
224 226
225 &rxvt_codeset_conv_jis0213_1, 227 &rxvt_codeset_conv_jis0213_1,
226 &rxvt_codeset_conv_jis0213_2, 228 &rxvt_codeset_conv_jis0213_2,
227 229
251# define ENCODING_COMPOSE 253# define ENCODING_COMPOSE
252#endif 254#endif
253 255
254#include "table/compose.h" 256#include "table/compose.h"
255 257
256uint32_t 258unicode_t
257rxvt_compose (uint32_t c1, uint32_t c2) 259rxvt_compose (unicode_t c1, unicode_t c2)
258{ 260{
259 int l = 0; 261 int l = 0;
260 int r = sizeof (rxvt_compose_table) / sizeof (rxvt_compose_entry) - 1; 262 int r = sizeof (rxvt_compose_table) / sizeof (rxvt_compose_entry) - 1;
261 int m; 263 int m;
262 264
273 return c.r; 275 return c.r;
274 } 276 }
275 277
276 return NOCHAR; 278 return NOCHAR;
277} 279}
280
281#include "table/category.h"
282
283bool unicode::is_space (unicode_t c)
284{
285 return IS_SPACE (c);
286}

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines