summaryrefslogtreecommitdiff
path: root/modules/hangul/tables-jamos.i
blob: 0b83d1a7f7a99c7fbbcd067691fb309f5081824c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
/* -*-c-*- */

#define KSC_JAMOBASE		0x2420
#define UNI_JAMOBASE		0x3130

#define KSC_KIYEOK		0x2421
#define KSC_SSANGKIYEOK		0x2422
#define KSC_KIYEOK_SIOS		0x2423
#define KSC_NIEUN		0x2424
#define KSC_NIEUN_CIEUC		0x2425
#define KSC_NIEUN_HIEUH		0x2426
#define KSC_TIKEUT		0x2427
#define KSC_SSANGTIKEUT		0x2428
#define KSC_RIEUL		0x2429
#define KSC_RIEUL_KIYEOK	0x242a
#define KSC_RIEUL_MIEUM		0x242b
#define KSC_RIEUL_PIEUP		0x242c
#define KSC_RIEUL_SIOS		0x242d
#define KSC_RIEUL_THIEUTH	0x242e
#define KSC_RIEUL_PHIEUPH	0x242f
#define KSC_RIEUL_HIEUH		0x2430
#define KSC_MIEUM		0x2431
#define KSC_PIEUP		0x2432
#define KSC_SSANGPIEUP		0x2433
#define KSC_PIEUP_SIOS		0x2434
#define KSC_SIOS		0x2435
#define KSC_SSANGSIOS		0x2436
#define KSC_IEUNG		0x2437
#define KSC_CIEUC		0x2438
#define KSC_SSANGCIEUC		0x2439
#define KSC_CHIEUCH		0x243a
#define KSC_KHIEUKH		0x243b
#define KSC_THIEUTH		0x243c
#define KSC_PHIEUPH		0x243d
#define KSC_HIEUH		0x243e

#define KSC_A			0x243f
#define KSC_AE			0x2440
#define KSC_YA			0x2441
#define KSC_YAE			0x2442
#define KSC_EO			0x2443
#define KSC_E			0x2444
#define KSC_YEO			0x2445
#define KSC_YE			0x2446
#define KSC_O			0x2447
#define KSC_WA			0x2448
#define KSC_WAE			0x2449
#define KSC_OE			0x244a
#define KSC_YO			0x244b
#define KSC_U			0x244c
#define KSC_WEO			0x244d
#define KSC_WE			0x244e
#define KSC_WI			0x244f
#define KSC_YU			0x2450
#define KSC_EU			0x2451
#define KSC_YI			0x2452
#define KSC_I			0x2453

#define KSC_SSANGNIEUN		0x2455
#define KSC_NIEUN_TIKEUT	0x2456
#define KSC_NIEUN_SIOS		0x2457
#define KSC_NIEUN_PANSIOS	0x2458
#define KSC_RIEUL_KIYEOK_SIOS	0x2459
#define KSC_RIEUL_TIKEUT	0x245a
#define KSC_RIEUL_PIEUP_SIOS	0x245b
#define KSC_RIEUL_PANSIOS	0x245c
#define KSC_RIEUL_YEORINHIEUH	0x245d
#define KSC_MIEUM_PIEUP		0x245e
#define KSC_MIEUM_SIOS		0x245f
#define KSC_MIEUM_PANSIOS	0x2460
#define KSC_KAPYEOUNMIEUM	0x2461
#define KSC_PIEUP_KIYEOK	0x2462
#define KSC_PIEUP_TIKEUT	0x2463
#define KSC_PIEUP_SIOS_KIYEOK	0x2464
#define KSC_PIEUP_SIOS_TIKEUT	0x2465
#define KSC_PIEUP_CIEUC		0x2466
#define KSC_PIEUP_THIEUTH	0x2467
#define KSC_KAPYEOUNPIEUP	0x2468
#define KSC_KAPYEOUNSSANGPIEUP	0x2469
#define KSC_SIOS_KIYEOK		0x246a
#define KSC_SIOS_NIEUN		0x246b
#define KSC_SIOS_TIKEUT		0x246c
#define KSC_SIOS_PIEUP		0x246d
#define KSC_SIOS_CIEUC		0x246e
#define KSC_PANSIOS		0x246f
#define KSC_SSANGIEUNG		0x2470
#define KSC_YESIEUNG		0x2471
#define KSC_IEUNG_CIEUC		0x2472
#define KSC_IEUNG_PANSIOS	0x2473
#define KSC_KAPYEOUNPHIEUPH	0x2474
#define KSC_SSANGHIEUH		0x2475
#define KSC_YEORINHIEUH		0x2476
#define KSC_YO_YA		0x2477
#define KSC_YO_YAE		0x2478
#define KSC_YO_I		0x2479
#define KSC_YU_YEO		0x247a
#define KSC_YU_YE		0x247b
#define KSC_YU_I		0x247c
#define KSC_ARAEA		0x247d
#define KSC_ARAEA_I		0x247e

/*
 * Some jamos are not representable with KSC5601.  These are ugly
 * fallbacks:
 *
 * CHITUEUMSIOS: 0x233c (less than)
 * CEONGCHITUEUMSIOS: 0x233e (greater than)
 * CHITUEUMCIEUC 0x237b (left bracket)
 * CEONGEUMCIEUC 0x237d (right bracket)
 * CHITUEUMCHIEUCH 0x237b (left brace)
 * CEONGEUMCHIEUCH 0x237d (right brace)
 */
#define KSC_CHITUEUMSIOS	0x233c
#define KSC_CEONGCHITUEUMSIOS	0x233e
#define KSC_CHITUEUMCIEUC	0x235b
#define KSC_CEONGEUMCIEUC	0x235d
#define KSC_CHITUEUMCHIEUCH	0x237b
#define KSC_CEONGEUMCHIEUCH	0x237d

static guint16 __jamo_to_ksc5601[0x100][3] =
{
  /*
   * CHOSEONG
   */
  /* CHOSEONG 0x1100 -- 0x1112 : matched to each ksc5601 Jamos extactly.  */
  {KSC_KIYEOK, 0, 0},
  {KSC_SSANGKIYEOK, 0, 0},
  {KSC_NIEUN, 0, 0},
  {KSC_TIKEUT, 0, 0},
  {KSC_SSANGTIKEUT, 0, 0},
  {KSC_RIEUL, 0, 0},
  {KSC_MIEUM, 0, 0},
  {KSC_PIEUP, 0, 0},
  {KSC_SSANGPIEUP, 0, 0},
  {KSC_SIOS, 0, 0},
  {KSC_SSANGSIOS, 0, 0},
  {KSC_IEUNG, 0, 0},
  {KSC_CIEUC, 0, 0},
  {KSC_SSANGCIEUC, 0, 0},
  {KSC_CHIEUCH, 0, 0},
  {KSC_KHIEUKH, 0, 0},
  {KSC_THIEUTH, 0, 0},
  {KSC_PHIEUPH, 0, 0},
  {KSC_HIEUH, 0, 0},
  /* Some of the following are representable as a glyph, the others not. */
  {KSC_NIEUN, KSC_KIYEOK, 0},
  {KSC_SSANGNIEUN, 0, 0},
  {KSC_NIEUN_TIKEUT, 0, 0},
  {KSC_NIEUN, KSC_PIEUP, 0},
  {KSC_TIKEUT, KSC_KIYEOK, 0},
  {KSC_RIEUL, KSC_NIEUN, 0},
  {KSC_RIEUL, KSC_RIEUL, 0},
  {KSC_RIEUL_HIEUH, 0, 0},
  {KSC_RIEUL, KSC_IEUNG, 0},
  {KSC_MIEUM_PIEUP, 0, 0},
  {KSC_KAPYEOUNMIEUM, 0, 0},
  {KSC_PIEUP_KIYEOK, 0, 0},
  {KSC_PIEUP, KSC_NIEUN, 0},
  {KSC_PIEUP_TIKEUT, 0, 0},
  {KSC_PIEUP_SIOS, 0, 0},
  {KSC_PIEUP_SIOS_KIYEOK, 0, 0},
  {KSC_PIEUP_SIOS_TIKEUT, 0, 0},
  {KSC_PIEUP, KSC_SIOS, KSC_PIEUP},
  {KSC_PIEUP, KSC_SIOS, KSC_SIOS},
  {KSC_PIEUP, KSC_SIOS, KSC_CIEUC},
  {KSC_PIEUP_CIEUC, 0, 0},
  {KSC_PIEUP, KSC_CHIEUCH, 0},
  {KSC_PIEUP_THIEUTH, 0, 0},
  {KSC_PIEUP, KSC_PHIEUPH, 0},
  {KSC_KAPYEOUNPIEUP, 0, 0},
  {KSC_KAPYEOUNSSANGPIEUP, 0, 0},
  {KSC_SIOS_KIYEOK, 0, 0},
  {KSC_SIOS_NIEUN, 0, 0},
  {KSC_SIOS_TIKEUT, 0, 0},
  {KSC_SIOS, KSC_RIEUL, 0},
  {KSC_SIOS, KSC_MIEUM, 0},
  {KSC_SIOS_PIEUP, 0, 0},
  {KSC_SIOS, KSC_PIEUP, KSC_KIYEOK},
  {KSC_SIOS, KSC_SIOS, KSC_SIOS},
  {KSC_SIOS, KSC_IEUNG, 0},
  {KSC_SIOS_CIEUC, 0, 0},
  {KSC_SIOS, KSC_CHIEUCH, 0},
  {KSC_SIOS, KSC_KHIEUKH, 0},
  {KSC_SIOS, KSC_THIEUTH, 0},
  {KSC_SIOS, KSC_PHIEUPH, 0},
  {KSC_SIOS, KSC_HIEUH, 0},
  {KSC_CHITUEUMSIOS, 0, 0},
  {KSC_CHITUEUMSIOS, KSC_CHITUEUMSIOS, 0},
  {KSC_CEONGCHITUEUMSIOS, 0, 0},
  {KSC_CEONGCHITUEUMSIOS, KSC_CEONGCHITUEUMSIOS, 0},
  {KSC_PANSIOS, 0, 0},
  {KSC_IEUNG, KSC_KIYEOK, 0},
  {KSC_IEUNG, KSC_TIKEUT, 0},
  {KSC_IEUNG, KSC_MIEUM, 0},
  {KSC_IEUNG, KSC_PIEUP, 0},
  {KSC_IEUNG, KSC_SIOS, 0},
  {KSC_IEUNG_PANSIOS, 0, 0},
  {KSC_SSANGIEUNG, 0, 0},
  {KSC_IEUNG_CIEUC, 0, 0},
  {KSC_IEUNG, KSC_CHIEUCH, 0},
  {KSC_IEUNG, KSC_THIEUTH, 0},
  {KSC_IEUNG, KSC_PHIEUPH, 0},
  {KSC_YESIEUNG, 0, 0},
  {KSC_CIEUC, KSC_IEUNG, 0},
  {KSC_CHITUEUMCIEUC, 0, 0},
  {KSC_CHITUEUMCIEUC, KSC_CHITUEUMCIEUC, 0},
  {KSC_CEONGEUMCIEUC, 0, 0},
  {KSC_CEONGEUMCIEUC, KSC_CEONGEUMCIEUC, 0},
  {KSC_CHIEUCH, KSC_KHIEUKH, 0},
  {KSC_CHIEUCH, KSC_HIEUH, 0},
  {KSC_CHITUEUMCHIEUCH, 0, 0},
  {KSC_CEONGEUMCHIEUCH, 0, 0},
  {KSC_PHIEUPH, KSC_PIEUP, 0},
  {KSC_KAPYEOUNPHIEUPH, 0, 0},
  {KSC_SSANGHIEUH, 0, 0},
  {KSC_YEORINHIEUH, 0, 0},
  /* 0x115A ~ 0x115E -- reserved */
  {0, 0, 0},
  {0, 0, 0},
  {0, 0, 0},
  {0, 0, 0},
  {0, 0, 0},
  /* CHOSEONG FILLER */
  {0, 0, 0},

  /*
   * JUNGSEONG
   */
  /*
   * JUNGSEONG
   */
  {0, 0, 0},			/* JUNGSEONG FILL */
  /* JUNGSEONG 0x1161 -- 0x1175 : matched to each ksc5601 Jamos extactly.  */
  {KSC_A, 0, 0},
  {KSC_AE, 0, 0},
  {KSC_YA, 0, 0},
  {KSC_YAE, 0, 0},
  {KSC_EO, 0, 0},
  {KSC_E, 0, 0},
  {KSC_YEO, 0, 0},
  {KSC_YE, 0, 0},
  {KSC_O, 0, 0},
  {KSC_WA, 0, 0},
  {KSC_WAE, 0, 0},
  {KSC_OE, 0, 0},
  {KSC_YO, 0, 0},
  {KSC_U, 0, 0},
  {KSC_WEO, 0, 0},
  {KSC_WE, 0, 0},
  {KSC_WI, 0, 0},
  {KSC_YU, 0, 0},
  {KSC_EU, 0, 0},
  {KSC_YI, 0, 0},
  {KSC_I, 0, 0},
  /* Some of the following are representable as a glyph, the others not. */
  {KSC_A, KSC_O, 0},
  {KSC_A, KSC_U, 0},
  {KSC_YA, KSC_O, 0},
  {KSC_YA, KSC_YO, 0},
  {KSC_EO, KSC_O, 0},
  {KSC_EO, KSC_U, 0},
  {KSC_EO, KSC_EU, 0},
  {KSC_YEO, KSC_O, 0},
  {KSC_YEO, KSC_U, 0},
  {KSC_O, KSC_EO, 0},
  {KSC_O, KSC_E, 0},
  {KSC_O, KSC_YE, 0},
  {KSC_O, KSC_O, 0},
  {KSC_O, KSC_U, 0},
  {KSC_YO_YA, 0, 0},
  {KSC_YO_YAE, 0, 0},
  {KSC_YO, KSC_YEO, 0},
  {KSC_YO, KSC_O, 0},
  {KSC_YO_I, 0, 0},
  {KSC_U, KSC_A, 0},
  {KSC_U, KSC_AE, 0},
  {KSC_U, KSC_EO, KSC_EU},
  {KSC_U, KSC_YE, 0},
  {KSC_U, KSC_U, 0},
  {KSC_YU, KSC_A, 0},
  {KSC_YU, KSC_EO, 0},
  {KSC_YU, KSC_E, 0},
  {KSC_YU_YEO, 0, 0},
  {KSC_YU_YE, 0, 0},
  {KSC_YU, KSC_U, 0},
  {KSC_YU_I, 0, 0},
  {KSC_EU, KSC_U, 0},
  {KSC_EU, KSC_EU, 0},
  {KSC_YI, KSC_U, 0},
  {KSC_I, KSC_A, 0},
  {KSC_I, KSC_YA, 0},
  {KSC_I, KSC_O, 0},
  {KSC_I, KSC_U, 0},
  {KSC_I, KSC_EU, 0},
  {KSC_I, KSC_ARAEA, 0},
  {KSC_ARAEA, 0, 0},
  {KSC_ARAEA, KSC_EO, 0},
  {KSC_ARAEA, KSC_U, 0},
  {KSC_ARAEA, KSC_I, 0},
  {KSC_ARAEA, KSC_ARAEA, 0},
  /* 0x11A3 ~ 0x11A7 -- reserved */
  {0, 0, 0},
  {0, 0, 0},
  {0, 0, 0},
  {0, 0, 0},
  {0, 0, 0},			/* (INTERNAL) JONGSEONG FILL */
  
  /*
   * JONGSEONG
   */
  {KSC_KIYEOK, 0, 0},
  {KSC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S},
  {KSC_RIEUL_PIEUP_SIOS, 0, 0},
  {KSC_RIEUL, KSC_PHIEUPH, KSC_HIEUH},
  {KSC_RIEUL, KSC_KAPYEOUNPIEUP, 0},
  {KSC_RIEUL, KSC_SIOS, KSC_SIOS},
  {KSC_RIEUL_PANSIOS, 0, 0},
  {KSC_RIEUL, KSC_KHIEUKH, 0},
  {KSC_RIEUL_YEORINHIEUH, 0, 0},
  {KSC_MIEUM, KSC_KIYEOK, 0},
  {KSC_MIEUM, KSC_RIEUL, 0},
  {KSC_MIEUM_PIEUP, 0, 0},
  {KSC_MIEUM_SIOS, 0, 0},
  {KSC_MIEUM, KSC_SIOS, KSC_SIOS},
  {KSC_MIEUM_PANSIOS, 0, 0},
  {KSC_MIEUM, KSC_CHIEUCH, 0},
  {KSC_MIEUM, KSC_HIEUH, 0},
  {KSC_KAPYEOUNMIEUM, 0, 0},
  {KSC_PIEUP, KSC_RIEUL, 0},
  {KSC_PIEUP, KSC_PHIEUPH, 0},
  {KSC_PIEUP, KSC_HIEUH, 0},
  {KSC_KAPYEOUNPIEUP, 0, 0},
  {KSC_SIOS_KIYEOK, 0, 0},
  {KSC_SIOS_TIKEUT, 0, 0},
  {KSC_SIOS, KSC_RIEUL, 0},
  {KSC_SIOS_PIEUP, 0, 0},
  {KSC_PANSIOS, 0, 0},
  {KSC_IEUNG, KSC_KIYEOK, 0},
  {KSC_IEUNG, KSC_KIYEOK, KSC_KIYEOK},
  {KSC_SSANGIEUNG, 0, 0},
  {KSC_IEUNG, KSC_KHIEUKH, 0},
  {KSC_YESIEUNG, 0, 0},
  {KSC_YESIEUNG, KSC_SIOS, 0},
  {KSC_YESIEUNG, KSC_PANSIOS, 0},
  {KSC_PHIEUPH, KSC_PIEUP, 0},
  {KSC_KAPYEOUNPHIEUPH, 0, 0},
  {KSC_HIEUH, KSC_NIEUN, 0},
  {KSC_HIEUH, KSC_RIEUL, 0},
  {KSC_HIEUH, KSC_MIEUM, 0},
  {KSC_HIEUH, KSC_PIEUP, 0},
  {KSC_YEORINHIEUH, 0, 0},
  /* reserved */
  {0, 0, 0},
  {0, 0, 0},
  {0, 0, 0},
  {0, 0, 0},
  {0, 0, 0},
  {0, 0, 0}
};