updated on Tue Jan 10 00:10:07 UTC 2012
[aur-mirror.git] / libhangul-3beol / 05_3beol.patch
blobccecb6c153e10a58ddfc7ff1ab1ec93039754e66
1 Description: Upstream changes introduced in version 0.1.0-0+oneiric1024~3beol
2 This patch has been created by dpkg-source during the package build.
3 Here's the last changelog entry, hopefully it gives details on why
4 those changes were made:
6 libhangul (0.1.0-0+oneiric1024~3beol) oneiric; urgency=low
8 [floor]
9 * 3beol
11 The person named in the Author field signed this changelog entry.
12 Author: floor <createsc@gmail.com>
14 ---
15 The information above should follow the Patch Tagging Guidelines, please
16 checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
17 are templates for supplementary fields that you might want to add:
19 Origin: <vendor|upstream|other>, <url of original patch>
20 Bug: <url in upstream bugtracker>
21 Bug-Debian: http://bugs.debian.org/<bugnumber>
22 Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
23 Forwarded: <no|not-needed|url proving that it has been forwarded>
24 Reviewed-By: <name and email of someone who approved the patch>
25 Last-Update: <YYYY-MM-DD>
27 --- libhangul-0.1.0.orig/hangul/hangul.h
28 +++ libhangul-0.1.0/hangul/hangul.h
29 @@ -87,6 +87,7 @@ enum {
30 enum {
31 HANGUL_KEYBOARD_TYPE_JAMO,
32 HANGUL_KEYBOARD_TYPE_JASO,
33 + HANGUL_KEYBOARD_TYPE_SHIN_JASO,
34 HANGUL_KEYBOARD_TYPE_ROMAJA
37 --- libhangul-0.1.0.orig/hangul/hangulinputcontext.c
38 +++ libhangul-0.1.0/hangul/hangulinputcontext.c
39 @@ -210,6 +210,8 @@ struct _HangulBuffer {
40 ucschar jungseong;
41 ucschar jongseong;
43 + bool double_moeum;
45 ucschar stack[12];
46 int index;
48 @@ -242,6 +244,11 @@ static const HangulCombination hangul_co
49 (HangulCombinationItem*)hangul_combination_table_default
52 +static const HangulCombination hangul_combination_3ahnmatae = {
53 + N_ELEMENTS(hangul_combination_table_3ahnmatae),
54 + (HangulCombinationItem*)hangul_combination_table_3ahnmatae
55 +};
57 static const HangulCombination hangul_combination_romaja = {
58 N_ELEMENTS(hangul_combination_table_romaja),
59 (HangulCombinationItem*)hangul_combination_table_romaja
60 @@ -297,6 +304,38 @@ static const HangulKeyboard hangul_keybo
61 &hangul_combination_default
64 +static const HangulKeyboard hangul_keyboard_3shin = {
65 + HANGUL_KEYBOARD_TYPE_SHIN_JASO,
66 + "3shin",
67 + N_("Sebeolsik Shin"),
68 + (ucschar*)hangul_keyboard_table_3shin,
69 + &hangul_combination_default
70 +};
72 +static const HangulKeyboard hangul_keyboard_3ahnmatae = {
73 + HANGUL_KEYBOARD_TYPE_JASO,
74 + "3ahn",
75 + N_("Sebeolsik 3Ahnmatae"),
76 + (ucschar*)hangul_keyboard_table_3ahnmatae,
77 + &hangul_combination_3ahnmatae
78 +};
80 +static const HangulKeyboard hangul_keyboard_2dvorak = {
81 + HANGUL_KEYBOARD_TYPE_JAMO,
82 + "2d",
83 + N_("Dubeolsik Dvorak"),
84 + (ucschar*)hangul_keyboard_table_2dvorak,
85 + &hangul_combination_default
86 +};
88 +static const HangulKeyboard hangul_keyboard_3finaldvorak = {
89 + HANGUL_KEYBOARD_TYPE_JASO,
90 + "3fd",
91 + N_("Sebeolsik Final Dvorak"),
92 + (ucschar*)hangul_keyboard_table_3finaldvorak,
93 + &hangul_combination_default
94 +};
96 static const HangulKeyboard hangul_keyboard_3sun = {
97 HANGUL_KEYBOARD_TYPE_JASO,
98 "3s",
99 @@ -334,6 +373,10 @@ static const HangulKeyboard* hangul_keyb
100 &hangul_keyboard_2y,
101 &hangul_keyboard_390,
102 &hangul_keyboard_3final,
103 + &hangul_keyboard_3shin,
104 + &hangul_keyboard_3ahnmatae,
105 + &hangul_keyboard_2dvorak,
106 + &hangul_keyboard_3finaldvorak,
107 &hangul_keyboard_3sun,
108 &hangul_keyboard_3yet,
109 &hangul_keyboard_32,
110 @@ -571,6 +614,8 @@ hangul_buffer_clear(HangulBuffer *buffer
111 buffer->jungseong = 0;
112 buffer->jongseong = 0;
114 + buffer->double_moeum = false;
116 buffer->index = -1;
117 buffer->stack[0] = 0;
118 buffer->stack[1] = 0;
119 @@ -723,6 +768,9 @@ hangul_buffer_backspace(HangulBuffer *bu
120 buffer->choseong = 0;
121 buffer->jungseong = 0;
122 buffer->jongseong = 0;
124 + buffer->double_moeum = false;
126 return true;
129 @@ -1077,6 +1125,541 @@ hangul_ic_process_jaso(HangulInputContex
132 static bool
133 +hangul_ic_process_shin_jaso(HangulInputContext *hic, int ascii, ucschar ch)
135 + if (hangul_is_choseong(ch)) {
136 + if(hic->buffer.choseong){//첫소리 있고, 첫소리가 들어왔다.
137 + if(ch == 0x1106 || ch == 0x110e || ch == 0x1111){//1106(ㅁ) 110e(ㅊ) 1111(ㅍ) //첫소리 있고, ㅁ, ㅊ, ㅍ 가 들어왔다.
138 + if(hic->buffer.jungseong){//첫소리, 가윗소리가 있다. 들어온 첫소리를 첫소리로 한다.
139 + ucschar choseong = 0;
140 + if (hangul_is_choseong(hangul_ic_peek(hic))) {
141 + choseong = hangul_combination_combine(hic->keyboard->combination,
142 + hic->buffer.choseong, ch);
144 + if (choseong) {
145 + if (!hangul_ic_push(hic, choseong)) {
146 + if (!hangul_ic_push(hic, choseong)) {
147 + return false;
150 + } else {
151 + hangul_ic_save_commit_string(hic);
152 + if (!hangul_ic_push(hic, ch)) {
153 + return false;
156 + }else{//첫소리 있고, 가윗소리가 비었다. 들어온 첫소리를 가윗소리로 바꾼다.
157 + ch = hangul_shin_choseong_to_shin_jungseong(ch);
158 + if(ch == 0x1169 || ch == 0x116e){//1169(ㅗ) 116e(ㅜ)
159 + hic->buffer.double_moeum = true;
161 + if (!hangul_ic_push(hic, ch)) {
162 + if (!hangul_ic_push(hic, ch)) {
163 + return false;
167 + }else{//첫소리 있고, ㅁ, ㅊ, ㅍ 가 아닌 첫소리가 들어와서 첫소리로 다룬다.
168 + ucschar choseong = 0;
169 + if (hangul_is_choseong(hangul_ic_peek(hic))) {
170 + choseong = hangul_combination_combine(hic->keyboard->combination,
171 + hic->buffer.choseong, ch);
173 + if (choseong) {
174 + if (!hangul_ic_push(hic, choseong)) {
175 + if (!hangul_ic_push(hic, choseong)) {
176 + return false;
179 + } else {
180 + hangul_ic_save_commit_string(hic);
181 + if (!hangul_ic_push(hic, ch)) {
182 + return false;
186 + }else{//첫소리 없고, 들어온 첫소리를 첫소리로 다룬다.
187 + if (!hangul_ic_push(hic, ch)) {
188 + if (!hangul_ic_push(hic, ch)) {
189 + return false;
193 + } else if (hangul_is_jungseong(ch)) {
194 + if (hic->buffer.jungseong == 0) {//가윗소리가 없다. 들어온 가윗소리를 가윗소리로 다룬다.
195 + if(ascii == 'O' || ascii == 'P'){//들어온 겹모음용 ㅜ, ㅗ 가윗 소리를 겹모음용으로 다룬다.//Shift + key
196 + hic->buffer.double_moeum = true;
198 + if (!hangul_ic_push(hic, ch)) {
199 + if (!hangul_ic_push(hic, ch)) {
200 + return false;
203 + } else {//가윗소리가 있다. 가윗소리가 들어왔다.
204 + if(hic->buffer.double_moeum){//겹모음용 가윗소리가 있다,
205 + if(ascii == 'O' || ascii == 'P'){//들어온 겹모음용 ㅜ, ㅗ 가윗 소리를 겹모음용으로 다룬다.
206 + ucschar jungseong = 0;
208 + if (hangul_is_jungseong(hangul_ic_peek(hic))) {
209 + jungseong = hangul_combination_combine(hic->keyboard->combination,
210 + hic->buffer.jungseong, ch);
212 + if (jungseong) {
213 + if (!hangul_ic_push(hic, jungseong)) {
214 + if (!hangul_ic_push(hic, jungseong)) {
215 + hic->buffer.double_moeum = false;
216 + return false;
219 + } else {
220 + hangul_ic_save_commit_string(hic);
221 + if (!hangul_ic_push(hic, ch)) {
222 + if (!hangul_ic_push(hic, ch)) {
223 + hic->buffer.double_moeum = true;
224 + return false;
228 + }else{//겹모음용 가윗소리가 있고, 홑모음용 가윗소리가 들어왔다.
229 + ucschar jungseong = 0;
231 + if (hangul_is_jungseong(hangul_ic_peek(hic))) {
232 + jungseong = hangul_combination_combine(hic->keyboard->combination,
233 + hic->buffer.jungseong, ch);
235 + if (jungseong) {
236 + if (!hangul_ic_push(hic, jungseong)) {
237 + if (!hangul_ic_push(hic, jungseong)) {
238 + hic->buffer.double_moeum = false;
239 + return false;
242 + } else {
243 + hangul_ic_save_commit_string(hic);
244 + if (!hangul_ic_push(hic, ch)) {
245 + if (!hangul_ic_push(hic, ch)) {
246 + hic->buffer.double_moeum = false;
247 + return false;
252 + }else{//홑모음 가윗소리가 있다.
253 + if(ascii == 'O' || ascii == 'P'){//들어온 겹모음용 ㅜ, ㅗ 가윗 소리를 겹모음용으로 다룬다.
254 + ucschar jungseong = 0;
256 + if (hangul_is_jungseong(hangul_ic_peek(hic))) {
257 + jungseong = hangul_combination_combine(hic->keyboard->combination,
258 + hic->buffer.jungseong, ch);
260 + if (jungseong) {//홑모음용 가윗소리가 있다. 겹모음용 ㅜ, ㅗ 가윗소리가 들어왔다.
261 + if (!hangul_ic_push(hic, jungseong)) {
262 + if (!hangul_ic_push(hic, jungseong)) {
263 + hic->buffer.double_moeum = false;
264 + return false;
267 + } else {//가윗소리 홑모음용이 있고, 겹모음용 가윗소리가 들어왔지만 모으지 못했다.
268 + hangul_ic_save_commit_string(hic);
269 + if (!hangul_ic_push(hic, ch)) {
270 + if (!hangul_ic_push(hic, ch)) {
271 + hic->buffer.double_moeum = true;
272 + return false;
276 + }else{//홑모음 가윗소리가 있다. 홑모음 가윗소리가 들어왔다.
277 + ucschar jungseong = 0;
279 + if (hangul_is_jungseong(hangul_ic_peek(hic))) {
280 + jungseong = hangul_combination_combine(hic->keyboard->combination,
281 + hic->buffer.jungseong, ch);
283 + if (jungseong) {
284 + if (!hangul_ic_push(hic, jungseong)) {
285 + if (!hangul_ic_push(hic, jungseong)) {
286 + hic->buffer.double_moeum = false;
287 + return false;
290 + } else {//가윗소리 홑모음용이 있고, 가윗소리가 들어왔다.
291 + hangul_ic_save_commit_string(hic);
292 + if (!hangul_ic_push(hic, ch)) {
293 + if (!hangul_ic_push(hic, ch)) {
294 + hic->buffer.double_moeum = false;
295 + return false;
302 + } else if (hangul_is_jongseong(ch)) {
303 + if(hic->buffer.choseong){//첫소리가 있다.
304 + if(hic->buffer.jungseong){//첫소리, 가윗소리가 있다.
305 +// if(hic->buffer.jungseong == 0x1169 || hic->buffer.jungseong == 0x116e){//1169(ㅗ) 116e(ㅜ) //첫소리, 가윗소리 ㅜ, ㅗ 가 있다. 끝소리가 들어왔다.
306 + if(hic->buffer.double_moeum){//1169(ㅗ) 116e(ㅜ) //가윗소리에 겹모음용이 들어있다.
307 + if(ch == 0x11b7){//끝소리가 ᆷ 이면 끝소리로 다룬다.
308 + if (hic->buffer.jongseong == 0) {//첫소리, 가윗소리가 있다. 끝소리를 넣는다.
309 + if (!hangul_ic_push(hic, ch)) {
310 + if (!hangul_ic_push(hic, ch)) {
311 + return false;
314 + } else {//첫소리, 가윗소리, 끝소리가 있다.
315 + ucschar jongseong = 0;
316 + if (hangul_is_jongseong(hangul_ic_peek(hic))) {
317 + jongseong = hangul_combination_combine(hic->keyboard->combination,
318 + hic->buffer.jongseong, ch);
320 + if (jongseong) {
321 + if (!hangul_ic_push(hic, jongseong)) {
322 + if (!hangul_ic_push(hic, jongseong)) {
323 + return false;
326 + } else {
327 + hangul_ic_save_commit_string(hic);
328 + if (!hangul_ic_push(hic, ch)) {
329 + if (!hangul_ic_push(hic, ch)) {
330 + hic->buffer.double_moeum = false;
331 + return false;
336 + }else{//첫소리, 겹모음 가윗소리가 있다. 들어온 끝소리를 홑모음 가윗소리로 다룬다.
337 + ucschar new_temp = ch;
338 + ch = hangul_shin_jongseong_to_shin_jungseong(ch);
340 + ucschar jungseong = 0;
341 + if (hangul_is_jungseong(hangul_ic_peek(hic))) {
342 + jungseong = hangul_combination_combine(hic->keyboard->combination,
343 + hic->buffer.jungseong, ch);
345 + if (jungseong) {//첫소리, 가윗소리 ㅜ, ㅗ 가 겹모음용이다. 끝소리를 가윗소리로 바꾸어 합친다.
346 + if (!hangul_ic_push(hic, jungseong)) {
347 + if (!hangul_ic_push(hic, jungseong)) {
348 + hic->buffer.double_moeum = false;
349 + return false;
352 + } else {//첫소리가 있고, 겹모음 가윗소리가 있지만, 모음 합치기가 안되어 끝소리로 다룬다.
353 + ch = new_temp;
355 + if (hic->buffer.jongseong == 0) {//첫소리, 가윗소리가 있다. 끝소리를 넣는다.
356 + if (!hangul_ic_push(hic, ch)) {
357 + if (!hangul_ic_push(hic, ch)) {
358 + return false;
361 + } else {//첫소리, 가윗소리, 끝소리가 있다.
362 + ucschar jongseong = 0;
363 + if (hangul_is_jongseong(hangul_ic_peek(hic))) {
364 + jongseong = hangul_combination_combine(hic->keyboard->combination,
365 + hic->buffer.jongseong, ch);
367 + if (jongseong) {
368 + if (!hangul_ic_push(hic, jongseong)) {
369 + if (!hangul_ic_push(hic, jongseong)) {
370 + return false;
373 + } else {
374 + hangul_ic_save_commit_string(hic);
375 + if (!hangul_ic_push(hic, ch)) {
376 + if (!hangul_ic_push(hic, ch)) {
377 + hic->buffer.double_moeum = false;
378 + return false;
385 + }else{//첫소리, 홑모음용 가윗소리가 있다. 들어온 끝소리를 끝소리로 다룬다.
386 + if (hic->buffer.jongseong == 0) {//끝소리 처리 루틴;
387 + if (!hangul_ic_push(hic, ch)) {
388 + if (!hangul_ic_push(hic, ch)) {
389 + return false;
392 + } else {
393 + ucschar jongseong = 0;
394 + if (hangul_is_jongseong(hangul_ic_peek(hic))) {
395 + jongseong = hangul_combination_combine(hic->keyboard->combination,
396 + hic->buffer.jongseong, ch);
398 + if (jongseong) {
399 + if (!hangul_ic_push(hic, jongseong)) {
400 + if (!hangul_ic_push(hic, jongseong)) {
401 + return false;
404 + } else {
405 + hangul_ic_save_commit_string(hic);
406 + if (!hangul_ic_push(hic, ch)) {
407 + if (!hangul_ic_push(hic, ch)) {
408 + return false;
414 + }else{//첫소리가 있고, 가윗소리가 없다.
415 + if(ch == 0x11b7){//11b7 (ᆷ) // 첫소리가 있고, 가윗소리가 없다. 끝소리 ᆷ 이 들어왔다.
416 + if (hic->buffer.jongseong == 0) {//끝소리 처리 루틴;
417 + if (!hangul_ic_push(hic, ch)) {
418 + if (!hangul_ic_push(hic, ch)) {
419 + return false;
422 + } else {
423 + ucschar jongseong = 0;
424 + if (hangul_is_jongseong(hangul_ic_peek(hic))) {
425 + jongseong = hangul_combination_combine(hic->keyboard->combination,
426 + hic->buffer.jongseong, ch);
428 + if (jongseong) {
429 + if (!hangul_ic_push(hic, jongseong)) {
430 + if (!hangul_ic_push(hic, jongseong)) {
431 + return false;
434 + } else {
435 + hangul_ic_save_commit_string(hic);
436 + if (!hangul_ic_push(hic, ch)) {
437 + if (!hangul_ic_push(hic, ch)) {
438 + return false;
443 + }else{//첫소리가 있고, 가윗소리가 없다. 들어온 끝소리를 가윗소리로 다룬다.
444 + ch = hangul_shin_jongseong_to_shin_jungseong(ch);
446 + if (!hangul_ic_push(hic, ch)) {
447 + if (!hangul_ic_push(hic, ch)) {
448 + hic->buffer.double_moeum = false;
449 + return false;
454 + }else{//첫소리가 없다. 끝소리가 들어왔다.
455 + if(hic->buffer.jungseong){//첫소리가 없고, 가윗소리가 있다.
456 +// if(hic->buffer.jungseong == 0x1169 || hic->buffer.jungseong == 0x116e){//1169(ㅗ) 116e(ㅜ) //첫소리, 가윗소리 ㅜ, ㅗ 가 있다. 끝소리가 들어왔다.
457 + if(hic->buffer.double_moeum){//1169(ㅗ) 116e(ㅜ) //가윗소리에 겹모음용이 들어있다.
458 + if(ch == 0x11b7){//끝소리가 ᆷ 이면 끝소리로 다룬다.
459 + if (hic->buffer.jongseong == 0) {//첫소리 없고, 가윗소리가 있다. 끝소리를 넣는다.
460 + if (!hangul_ic_push(hic, ch)) {
461 + if (!hangul_ic_push(hic, ch)) {
462 + return false;
465 + } else {//첫소리, 가윗소리, 끝소리가 있다.
466 + ucschar jongseong = 0;
467 + if (hangul_is_jongseong(hangul_ic_peek(hic))) {
468 + jongseong = hangul_combination_combine(hic->keyboard->combination,
469 + hic->buffer.jongseong, ch);
471 + if (jongseong) {
472 + if (!hangul_ic_push(hic, jongseong)) {
473 + if (!hangul_ic_push(hic, jongseong)) {
474 + return false;
477 + } else {
478 + hangul_ic_save_commit_string(hic);
479 + if (!hangul_ic_push(hic, ch)) {
480 + if (!hangul_ic_push(hic, ch)) {
481 + hic->buffer.double_moeum = false;
482 + return false;
487 + }else{//첫소리없고, 겹모음 가윗소리가 있다. 들어온 끝소리를 홑모음 가윗소리로 다룬다.
488 + ucschar new_temp = ch;
489 + ch = hangul_shin_jongseong_to_shin_jungseong(ch);
491 + ucschar jungseong = 0;
492 + if (hangul_is_jungseong(hangul_ic_peek(hic))) {
493 + jungseong = hangul_combination_combine(hic->keyboard->combination,
494 + hic->buffer.jungseong, ch);
496 + if (jungseong) {//첫소리없고, 가윗소리 ㅜ, ㅗ 가 겹모음용이다. 끝소리를 가윗소리로 바꾸어 합친다.
497 + if (!hangul_ic_push(hic, jungseong)) {
498 + if (!hangul_ic_push(hic, jungseong)) {
499 + hic->buffer.double_moeum = false;
500 + return false;
503 + } else {//첫소리가 없고, 겹모음 가윗소리가 있지만, 모음 합치기가 안되어 끝소리로 다룬다.
504 + ch = new_temp;
506 + if (hic->buffer.jongseong == 0) {//첫소리 없고, 가윗소리가 있다. 끝소리를 넣는다.
507 + if (!hangul_ic_push(hic, ch)) {
508 + if (!hangul_ic_push(hic, ch)) {
509 + return false;
512 + } else {//첫소리 없고, 가윗소리, 끝소리가 있다.
513 + ucschar jongseong = 0;
514 + if (hangul_is_jongseong(hangul_ic_peek(hic))) {
515 + jongseong = hangul_combination_combine(hic->keyboard->combination,
516 + hic->buffer.jongseong, ch);
518 + if (jongseong) {
519 + if (!hangul_ic_push(hic, jongseong)) {
520 + if (!hangul_ic_push(hic, jongseong)) {
521 + return false;
524 + } else {
525 + hangul_ic_save_commit_string(hic);
526 + if (!hangul_ic_push(hic, ch)) {
527 + if (!hangul_ic_push(hic, ch)) {
528 + hic->buffer.double_moeum = false;
529 + return false;
536 + }else{//첫소리 없고, 홑모음용 가윗소리가 있다. 들어온 끝소리를 끝소리로 다룬다.
537 + if (hic->buffer.jongseong == 0) {//끝소리 처리 루틴;
538 + if (!hangul_ic_push(hic, ch)) {
539 + if (!hangul_ic_push(hic, ch)) {
540 + return false;
543 + } else {
544 + ucschar jongseong = 0;
545 + if (hangul_is_jongseong(hangul_ic_peek(hic))) {
546 + jongseong = hangul_combination_combine(hic->keyboard->combination,
547 + hic->buffer.jongseong, ch);
549 + if (jongseong) {
550 + if (!hangul_ic_push(hic, jongseong)) {
551 + if (!hangul_ic_push(hic, jongseong)) {
552 + return false;
555 + } else {
556 + hangul_ic_save_commit_string(hic);
557 + if (!hangul_ic_push(hic, ch)) {
558 + if (!hangul_ic_push(hic, ch)) {
559 + return false;
565 + }else{//첫소리가 없고, 가윗소리가 없다. 끝소리가 들어왔다.
566 + if (hic->buffer.jongseong == 0) {//끝소리 처리 루틴;
567 + if (!hangul_ic_push(hic, ch)) {
568 + if (!hangul_ic_push(hic, ch)) {
569 + return false;
572 + } else {
573 + ucschar jongseong = 0;
574 + if (hangul_is_jongseong(hangul_ic_peek(hic))) {
575 + jongseong = hangul_combination_combine(hic->keyboard->combination,
576 + hic->buffer.jongseong, ch);
578 + if (jongseong) {
579 + if (!hangul_ic_push(hic, jongseong)) {
580 + if (!hangul_ic_push(hic, jongseong)) {
581 + return false;
584 + } else {
585 + hangul_ic_save_commit_string(hic);
586 + if (!hangul_ic_push(hic, ch)) {
587 + if (!hangul_ic_push(hic, ch)) {
588 + return false;
595 + } else if (ch > 0) {
596 + hangul_ic_save_commit_string(hic);
597 + hic->buffer.double_moeum = false;
598 + hangul_ic_append_commit_string(hic, ch);
599 + } else {
600 + hangul_ic_save_commit_string(hic);
601 + hic->buffer.double_moeum = false;
602 + return false;
605 + hangul_ic_save_preedit_string(hic);
606 + return true;
610 + if (hic->buffer.choseong == 0) {//첫소리 처리 루틴;
611 + if (!hangul_ic_push(hic, ch)) {
612 + if (!hangul_ic_push(hic, ch)) {
613 + return false;
616 + } else {
617 + ucschar choseong = 0;
618 + if (hangul_is_choseong(hangul_ic_peek(hic))) {
619 + choseong = hangul_combination_combine(hic->keyboard->combination,
620 + hic->buffer.choseong, ch);
622 + if (choseong) {
623 + if (!hangul_ic_push(hic, choseong)) {
624 + if (!hangul_ic_push(hic, choseong)) {
625 + return false;
628 + } else {
629 + hangul_ic_save_commit_string(hic);
630 + if (!hangul_ic_push(hic, ch)) {
631 + return false;
635 + */
638 + if (hic->buffer.jongseong == 0) {//끝소리 처리 루틴;
639 + if (!hangul_ic_push(hic, ch)) {
640 + if (!hangul_ic_push(hic, ch)) {
641 + return false;
644 + } else {
645 + ucschar jongseong = 0;
646 + if (hangul_is_jongseong(hangul_ic_peek(hic))) {
647 + jongseong = hangul_combination_combine(hic->keyboard->combination,
648 + hic->buffer.jongseong, ch);
650 + if (jongseong) {
651 + if (!hangul_ic_push(hic, jongseong)) {
652 + if (!hangul_ic_push(hic, jongseong)) {
653 + return false;
656 + } else {
657 + hangul_ic_save_commit_string(hic);
658 + if (!hangul_ic_push(hic, ch)) {
659 + if (!hangul_ic_push(hic, ch)) {
660 + return false;
667 +static bool
668 hangul_ic_process_romaja(HangulInputContext *hic, int ascii, ucschar ch)
670 ucschar jong;
671 @@ -1299,6 +1882,8 @@ hangul_ic_process(HangulInputContext *hi
672 return hangul_ic_process_jamo(hic, c);
673 else if (hangul_keyboard_get_type(hic->keyboard) == HANGUL_KEYBOARD_TYPE_JASO)
674 return hangul_ic_process_jaso(hic, c);
675 + else if (hangul_keyboard_get_type(hic->keyboard) == HANGUL_KEYBOARD_TYPE_SHIN_JASO)
676 + return hangul_ic_process_shin_jaso(hic, ascii, c);
677 else
678 return hangul_ic_process_romaja(hic, ascii, c);
680 --- libhangul-0.1.0.orig/hangul/hangulkeyboard.h
681 +++ libhangul-0.1.0/hangul/hangulkeyboard.h
682 @@ -1,3 +1,786 @@
683 +static const ucschar hangul_keyboard_table_3shin[] = {
684 + 0x0000 , /* 0x00 : null : */
685 + 0x0000 , /* 0x01 : start of heading : */
686 + 0x0000 , /* 0x02 : start of text : */
687 + 0x0000 , /* 0x03 : end of text : */
688 + 0x0000 , /* 0x04 : end of transmission : */
689 + 0x0000 , /* 0x05 : enquiry : */
690 + 0x0000 , /* 0x06 : acknowledge : */
691 + 0x0000 , /* 0x07 : bell : */
692 + 0x0000 , /* 0x08 : backspace : */
693 + 0x0000 , /* 0x09 : character tabulation : */
694 + 0x0000 , /* 0x0A : line feed (lf) : */
695 + 0x0000 , /* 0x0B : line tabulation : */
696 + 0x0000 , /* 0x0C : form feed (ff) : */
697 + 0x0000 , /* 0x0D : carriage return (cr) : */
698 + 0x0000 , /* 0x0E : shift out : */
699 + 0x0000 , /* 0x0F : shift in : */
700 + 0x0000 , /* 0x10 : data link escape : */
701 + 0x0000 , /* 0x11 : device control one : */
702 + 0x0000 , /* 0x12 : device control two : */
703 + 0x0000 , /* 0x13 : device control three : */
704 + 0x0000 , /* 0x14 : device control four : */
705 + 0x0000 , /* 0x15 : negative acknowledge : */
706 + 0x0000 , /* 0x16 : synchronous idle : */
707 + 0x0000 , /* 0x17 : end of transmission block : */
708 + 0x0000 , /* 0x18 : cancel : */
709 + 0x0000 , /* 0x19 : end of medium : */
710 + 0x0000 , /* 0x1A : substitute : */
711 + 0x0000 , /* 0x1B : escape : */
712 + 0x0000 , /* 0x1C : information separator four : */
713 + 0x0000 , /* 0x1D : information separator three : */
714 + 0x0000 , /* 0x1E : information separator two : */
715 + 0x0000 , /* 0x1F : information separator one : */
716 + 0x0000 , /* 0x20 : space : */
717 + 0x0021 , /* ! */ /* 0x21 : exclam : exclamation mark */
718 + 0x0022 , /* " */ /* 0x22 : quotedbl : quotation mark */
719 + 0x0023 , /* # */ /* 0x23 : numbersign : number sign */
720 + 0x0024 , /* $ */ /* 0x24 : dollar : dollar sign */
721 + 0x0025 , /* % */ /* 0x25 : percent : percent sign */
722 + 0x0026 , /* & */ /* 0x26 : ampersand : ampersand */
723 + 0x1110 , /* ' */ /* 0x27 : apostrophe : Choseong thieuth */
724 + 0x0028 , /* ( */ /* 0x28 : parenleft : left parenthesis */
725 + 0x0029 , /* ) */ /* 0x29 : parenright : right parenthesis */
726 + 0x002A , /* * */ /* 0x2A : asterisk : asterisk */
727 + 0x002B , /* + */ /* 0x2B : plus : plus sign */
728 + 0x002C , /* , */ /* 0x2C : comma : comma */
729 + 0x002D , /* - */ /* 0x2D : minus : minus sign */
730 + 0x002E , /* . */ /* 0x2E : period : period */
731 + 0x110f , /* / */ /* 0x2F : slash : choseong khieukh */
732 + 0x0030 , /* 0 */ /* 0x30 : 0 : 0 */
733 + 0x0031 , /* 1 */ /* 0x31 : 1 : 1 */
734 + 0x0032 , /* 2 */ /* 0x32 : 2 : 2 */
735 + 0x0033 , /* 3 */ /* 0x33 : 3 : 3 */
736 + 0x0034 , /* 4 */ /* 0x34 : 4 : 4 */
737 + 0x0035 , /* 5 */ /* 0x35 : 5 : 5 */
738 + 0x0036 , /* 6 */ /* 0x36 : 6 : 6 */
739 + 0x0037 , /* 7 */ /* 0x37 : 7 : 7 */
740 + 0x0038 , /* 8 */ /* 0x38 : 8 : 8 */
741 + 0x0039 , /* 9 */ /* 0x39 : 9 : 9 */
742 + 0x003A , /* : */ /* 0x3A : colon : colon */
743 + 0x1107 , /* ; */ /* 0x3B : semicolon : Choseong pieup */
744 + 0x003c , /* < */ /* 0x3C : less : less-than sign */
745 + 0x003d , /* = */ /* 0x3D : equal : equals sign */
746 + 0x003e , /* > */ /* 0x3E : greater : greater-than sign */
747 + 0x003f , /* ? */ /* 0x3F : question : question mark */
748 + 0x0040 , /* @ */ /* 0x40 : at : commercial at */
749 + 0x1172 , /* A */ /* 0x41 : A : jungseong yu */
750 + 0x116e , /* B */ /* 0x42 : B : jungseong u */
751 + 0x1166 , /* C */ /* 0x43 : C : jungseong e */
752 + 0x1175 , /* D */ /* 0x44 : D : jungseong I */
753 + 0x1167 , /* E */ /* 0x45 : E : jungseong yeo */
754 + 0x1161 , /* F */ /* 0x46 : F : jungseong a */
755 + 0x1173 , /* G */ /* 0x47 : G : jungseong eu */
756 + 0x2018 , /* H */ /* 0x48 : H : quota left */
757 + 0x1174 , /* I */ /* 0x49 : I : jungseong yeu */
758 + 0x2019 , /* J */ /* 0x4A : J : quota right */
759 + 0x003b , /* K */ /* 0x4B : K : semicolon */
760 + 0x0027 , /* L */ /* 0x4C : L : quota */
761 + 0x002F , /* M */ /* 0x4D : M : slash */
762 + 0x02d0 , /* N */ /* 0x4E : N : ː 0x02d0 <- 0x119e jungseong arae a */
763 + 0x116e , /* O */ /* 0x4F : O : jungseong u */
764 + 0x1169 , /* P */ /* 0x50 : P : jungseong o */
765 + 0x1164 , /* Q */ /* 0x51 : Q : jungseong yae */
766 + 0x1162 , /* R */ /* 0x52 : R : jungseong yeo */
767 + 0x1168 , /* S */ /* 0x53 : S : jungseong ye */
768 + 0x1165 , /* T */ /* 0x54 : T : jungseong eo */
769 + 0x201d , /* U */ /* 0x55 : U : quotadouble right */
770 + 0x1169 , /* V */ /* 0x56 : V : jungseong o */
771 + 0x1163 , /* W */ /* 0x57 : W : jungseong ya */
772 + 0x116d , /* X */ /* 0x58 : X : jungseong yo */
773 + 0x201c , /* Y */ /* 0x59 : Y : quotadouble left */
774 + 0x203b , /* Z */ /* 0x5A : Z : reference mark */
775 + 0x005b , /* [ */ /* 0x5B : bracketleft : left bracket */
776 + 0x005c , /* \ */ /* 0x5C : backslash : backslash */
777 + 0x005d , /* ] */ /* 0x5D : bracketright : right bracket */
778 + 0x005e , /* ^ */ /* 0x5E : asciicircum : circumflex accent */
779 + 0x005f , /* _ */ /* 0x5F : underscore : underscore */
780 + 0x0060 , /* ` */ /* 0x60 : quoteleft : grave accent */
781 + 0x11bc , /* a */ /* 0x61 : a : Jongseong ieung */
782 + 0x11bf , /* b */ /* 0x62 : b : Jongseong khiyeok */
783 + 0x11be , /* c */ /* 0x63 : c : Jongseong chieuch */
784 + 0x11ae , /* d */ /* 0x64 : d : Jongseong tikeut */
785 + 0x11b8 , /* e */ /* 0x65 : e : Jongseong pieup */
786 + 0x11bb , /* f */ /* 0x66 : f : Jongseong ssangsios */
787 + 0x11bd , /* g */ /* 0x67 : g : Jongseong cieuc */
788 + 0x1102 , /* h */ /* 0x68 : h : Choseong nieun */
789 + 0x1106 , /* i */ /* 0x69 : i : Choseong mieum */
790 + 0x110b , /* j */ /* 0x6A : j : Choseong ieung */
791 + 0x1100 , /* k */ /* 0x6B : k : Choseong kiyeok */
792 + 0x110c , /* l */ /* 0x6C : l : Choseong cieuc */
793 + 0x1112 , /* m */ /* 0x6D : m : Choseong hieuh */
794 + 0x1109 , /* n */ /* 0x6E : n : Choseong sios */
795 + 0x110e , /* o */ /* 0x6F : o : Choseong chieuch */
796 + 0x1111 , /* p */ /* 0x70 : p : Choseong phieuph */
797 + 0x11ba , /* q */ /* 0x71 : q : Jongseong sios */
798 + 0x11c0 , /* r */ /* 0x72 : r : Jongseong thikeuth */
799 + 0x11ab , /* s */ /* 0x73 : s : Jongseong nieun */
800 + 0x11c1 , /* t */ /* 0x74 : t : Jongseong phieuph */
801 + 0x1103 , /* u */ /* 0x75 : u : Choseong tikeut */
802 + 0x11c2 , /* v */ /* 0x76 : v : Jongseong hieuh */
803 + 0x11af , /* w */ /* 0x77 : w : Jongseong rieul */
804 + 0x11a8 , /* x */ /* 0x78 : x : Jongseong kiyeok */
805 + 0x1105 , /* y */ /* 0x79 : y : Choseong rieul */
806 + 0x11b7 , /* z */ /* 0x7A : z : Jongseong mieum */
807 + 0x007b , /* { */ /* 0x7B : braceleft : left brace */
808 + 0x007c , /* | */ /* 0x7C : bar : vertical bar */
809 + 0x007d , /* } */ /* 0x7D : braceright : right brace */
810 + 0x007e , /* ~ */ /* 0x7E : asciitilde : tilde */
811 + 0x0000 /* 0x7F : delete : */
814 +static const ucschar hangul_keyboard_table_2dvorak[] = {
815 + 0x0000, /* 0x00 null */
816 + 0x0000, /* 0x01 start of heading */
817 + 0x0000, /* 0x02 start of text */
818 + 0x0000, /* 0x03 end of text */
819 + 0x0000, /* 0x04 end of transmission */
820 + 0x0000, /* 0x05 enquiry */
821 + 0x0000, /* 0x06 acknowledge */
822 + 0x0000, /* 0x07 bell */
823 + 0x0000, /* 0x08 backspace */
824 + 0x0000, /* 0x09 character tabulation */
825 + 0x0000, /* 0x0A line feed (lf) */
826 + 0x0000, /* 0x0B line tabulation */
827 + 0x0000, /* 0x0C form feed (ff) */
828 + 0x0000, /* 0x0D carriage return (cr) */
829 + 0x0000, /* 0x0E shift out */
830 + 0x0000, /* 0x0F shift in */
831 + 0x0000, /* 0x10 data link escape */
832 + 0x0000, /* 0x11 device control one */
833 + 0x0000, /* 0x12 device control two */
834 + 0x0000, /* 0x13 device control three */
835 + 0x0000, /* 0x14 device control four */
836 + 0x0000, /* 0x15 negative acknowledge */
837 + 0x0000, /* 0x16 synchronous idle */
838 + 0x0000, /* 0x17 end of transmission block */
839 + 0x0000, /* 0x18 cancel */
840 + 0x0000, /* 0x19 end of medium */
841 + 0x0000, /* 0x1A substitute */
842 + 0x0000, /* 0x1B escape */
843 + 0x0000, /* 0x1C information separator four */
844 + 0x0000, /* 0x1D information separator three */
845 + 0x0000, /* 0x1E information separator two */
846 + 0x0000, /* 0x1F information separator one */
847 + 0x0000, /* 0x20 space */
848 + 0x0021, /* ! 0x21 exclam: exclamation mark */
849 + 0x1108, /* " 0x22 quotedbl: quotation mark */
850 + 0x0023, /* # 0x23 numbersign: number sign */
851 + 0x0024, /* $ 0x24 dollar: dollar sign */
852 + 0x0025, /* % 0x25 percent: percent sign */
853 + 0x0026, /* & 0x26 ampersand: ampersand */
854 + 0x1107, /* ' 0x27 apostrophe: apostrophe */
855 + 0x0028, /* ( 0x28 parenleft: left parenthesis */
856 + 0x0029, /* ) 0x29 parenright: right parenthesis */
857 + 0x002a, /* * 0x2A asterisk: asterisk */
858 + 0x007d, /* + 0x2B plus: plus sign */
859 + 0x110c, /* , 0x2C comma: comma */
860 + 0x0027, /* - 0x2D minus: minus sign */
861 + 0x1103, /* . 0x2E period: period */
862 + 0x005b, /* / 0x2F slash: slash */
863 + 0x0030, /* 0x30 0: 0 */
864 + 0x0031, /* 0x31 1: 1 */
865 + 0x0032, /* 0x32 2: 2 */
866 + 0x0033, /* 0x33 3: 3 */
867 + 0x0034, /* 0x34 4: 4 */
868 + 0x0035, /* 0x35 5: 5 */
869 + 0x0036, /* 0x36 6: 6 */
870 + 0x0037, /* 0x37 7: 7 */
871 + 0x0038, /* 0x38 8: 8 */
872 + 0x0039, /* 0x39 9: 9 */
873 + 0x110f, /* : 0x3A colon: colon */
874 + 0x110f, /* ; 0x3B semicolon: semicolon */
875 + 0x110d, /* < 0x3C less: less-than sign */
876 + 0x005d, /* = 0x3D equal: equals sign */
877 + 0x1104, /* > 0x3E greater: greater-than sign */
878 + 0x007b, /* ? 0x3F question: question mark */
879 + 0x0040, /* @ 0x40 at: commercial at */
880 + 0x1106, /* 0x41 A: choseong mieum */
881 + 0x116e, /* 0x42 B: jungseong yu */
882 + 0x1163, /* 0x43 C: choseong chieuch */
883 + 0x1169, /* 0x44 D: choseong ieung */
884 + 0x110b, /* 0x45 E: choseong ssangtikeut */
885 + 0x116d, /* 0x46 F: choseong rieul */
886 + 0x1167, /* 0x47 G: choseong hieuh */
887 + 0x1165, /* 0x48 H: jungseong o */
888 + 0x1112, /* 0x49 I: jungseong ya */
889 + 0x110e, /* 0x4A J: jungseong eo */
890 + 0x1111, /* 0x4B K: jungseong a */
891 + 0x1168, /* 0x4C L: jungseong i */
892 + 0x1173, /* 0x4D M: jungseong eu */
893 + 0x1175, /* 0x4E N: jungseong u */
894 + 0x1102, /* 0x4F O: jungseong yae */
895 + 0x1101, /* 0x50 P: jungseong ye */
896 + 0x1110, /* 0x51 Q: choseong ssangpieup */
897 + 0x1164, /* 0x52 R: choseong ssangkiyeok */
898 + 0x003a, /* 0x53 S: choseong nieun */
899 + 0x1161, /* 0x54 T: choseong ssangsios */
900 + 0x1105, /* 0x55 U: jungseong yeo */
901 + 0x003e, /* 0x56 V: choseong phieuph */
902 + 0x003c, /* 0x57 W: choseong ssangcieuc */
903 + 0x1172, /* 0x58 X: choseong thieuth */
904 + 0x110a, /* 0x59 Y: jungseong yo */
905 + 0x003f, /* 0x5A Z: choseong khieukh */
906 + 0x002d, /* [ 0x5B bracketleft: left bracket */
907 + 0x005c, /* \ 0x5C backslash: backslash */
908 + 0x003d, /* ] 0x5D bracketright: right bracket */
909 + 0x005e, /* ^ 0x5E asciicircum: circumflex accent */
910 + 0x0022, /* _ 0x5F underscore: underscore */
911 + 0x0060, /* ` 0x60 quoteleft: grave accent */
912 + 0x1106, /* 0x61 a: choseong mieum */
913 + 0x116e, /* 0x62 b: jungseong yu */
914 + 0x1163, /* 0x63 c: choseong chieuch */
915 + 0x1169, /* 0x64 d: choseong ieung */
916 + 0x110b, /* 0x65 e: choseong tikeut */
917 + 0x116d, /* 0x66 f: choseong rieul */
918 + 0x1167, /* 0x67 g: choseong hieuh */
919 + 0x1165, /* 0x68 h: jungseong o */
920 + 0x1112, /* 0x69 i: jungseong ya */
921 + 0x110e, /* 0x6A j: jungseong eo */
922 + 0x1111, /* 0x6B k: jungseong a */
923 + 0x1166, /* 0x6C l: jungseong i */
924 + 0x1173, /* 0x6D m: jungseong eu */
925 + 0x1175, /* 0x6E n: jungseong u */
926 + 0x1102, /* 0x6F o: jungseong ae */
927 + 0x1100, /* 0x70 p: jungseong e */
928 + 0x1110, /* 0x71 q: choseong pieup */
929 + 0x1162, /* 0x72 r: choseong kiyeok */
930 + 0x003b, /* 0x73 s: choseong nieun */
931 + 0x1161, /* 0x74 t: choseong sios */
932 + 0x1105, /* 0x75 u: jungseong yeo */
933 + 0x002e, /* 0x76 v: choseong phieuph */
934 + 0x002c, /* 0x77 w: choseong cieuc */
935 + 0x1172, /* 0x78 x: choseong thieuth */
936 + 0x1109, /* 0x79 y: jungseong yo */
937 + 0x002f, /* 0x7A z: choseong khieukh */
938 + 0x005f, /* { 0x7B braceleft: left brace */
939 + 0x007c, /* | 0x7C bar: vertical bar */
940 + 0x002b, /* } 0x7D braceright: right brace */
941 + 0x007e, /* ~ 0x7E asciitilde: tilde */
942 + 0x0000 /* 0x7F delete */
945 +static const ucschar hangul_keyboard_table_3finaldvorak[] = {
946 + 0x0000, /* 0x00 null */
947 + 0x0000, /* 0x01 start of heading */
948 + 0x0000, /* 0x02 start of text */
949 + 0x0000, /* 0x03 end of text */
950 + 0x0000, /* 0x04 end of transmission */
951 + 0x0000, /* 0x05 enquiry */
952 + 0x0000, /* 0x06 acknowledge */
953 + 0x0000, /* 0x07 bell */
954 + 0x0000, /* 0x08 backspace */
955 + 0x0000, /* 0x09 character tabulation */
956 + 0x0000, /* 0x0A line feed (lf) */
957 + 0x0000, /* 0x0B line tabulation */
958 + 0x0000, /* 0x0C form feed (ff) */
959 + 0x0000, /* 0x0D carriage return (cr) */
960 + 0x0000, /* 0x0E shift out */
961 + 0x0000, /* 0x0F shift in */
962 + 0x0000, /* 0x10 data link escape */
963 + 0x0000, /* 0x11 device control one */
964 + 0x0000, /* 0x12 device control two */
965 + 0x0000, /* 0x13 device control three */
966 + 0x0000, /* 0x14 device control four */
967 + 0x0000, /* 0x15 negative acknowledge */
968 + 0x0000, /* 0x16 synchronous idle */
969 + 0x0000, /* 0x17 end of transmission block */
970 + 0x0000, /* 0x18 cancel */
971 + 0x0000, /* 0x19 end of medium */
972 + 0x0000, /* 0x1A substitute */
973 + 0x0000, /* 0x1B escape */
974 + 0x0000, /* 0x1C information separator four */
975 + 0x0000, /* 0x1D information separator three */
976 + 0x0000, /* 0x1E information separator two */
977 + 0x0000, /* 0x1F information separator one */
978 + 0x0000, /* 0x20 space */
979 + 0x11a9, /* ! 0x21 exclam: jongseong ssangkiyeok */
980 + 0x11c1, /* " 0x22 quotedbl: middle dot */
981 + 0x11bd, /* # 0x23 numbersign: jognseong cieuc */
982 + 0x11b5, /* $ 0x24 dollar: jongseong rieul-phieuph */
983 + 0x11b4, /* % 0x25 percent: jongseong rieul-thieuth */
984 + 0x201c, /* & 0x26 ampersand: left double quotation mark */
985 + 0x11ba, /* ' 0x27 apostrophe: choseong thieuth */
986 + 0x0027, /* ( 0x28 parenleft: apostrophe */
987 + 0x007e, /* ) 0x29 parenright: Tilde */
988 + 0x201d, /* * 0x2A asterisk: right double quotation mark */
989 + 0x002f, /* + 0x2B plus: plus sign */
990 + 0x11af, /* , 0x2C comma: comma */
991 + 0x1110, /* - 0x2D minus: right parenthesis */
992 + 0x1167, /* . 0x2E period: period */
993 + 0x0028, /* / 0x2F slash: jungseong o */
994 + 0x110f, /* 0x30 0: choseong khieukh */
995 + 0x11c2, /* 0x31 1: jongseong hieuh */
996 + 0x11bb, /* 0x32 2: jongseong ssangsios */
997 + 0x11b8, /* 0x33 3: jongseong pieup */
998 + 0x116d, /* 0x34 4: jungseong yo */
999 + 0x1172, /* 0x35 5: jungseong yu */
1000 + 0x1163, /* 0x36 6: jungseong ya */
1001 + 0x1168, /* 0x37 7: jungseong ye */
1002 + 0x1174, /* 0x38 8: jungseong yi */
1003 + 0x116e, /* 0x39 9: jungseong u */
1004 + 0x11be, /* : 0x3A colon: 4 */
1005 + 0x11b7, /* ; 0x3B semicolon: choseong pieup */
1006 + 0x11c0, /* < 0x3C less: comma */
1007 + 0x003c, /* = 0x3D equal: greater-than sign */
1008 + 0x11ac, /* > 0x3E greater: period */
1009 + 0x0025, /* ? 0x3F question: exclamation mark */
1010 + 0x11b0, /* @ 0x40 at: jongseong rieul-kiyeok */
1011 + 0x11ae, /* 0x41 A: jongseong tikeut */
1012 + 0x002d, /* 0x42 B: question mark */
1013 + 0x0037, /* 0x43 C: jongseong khieukh */
1014 + 0x0030, /* 0x44 D: jongseong rieul-pieup */
1015 + 0x11b2, /* 0x45 E: jongseong nieun-cieuc */
1016 + 0x0035, /* 0x46 F: jongseong rieul-mieum */
1017 + 0x0036, /* 0x47 G: jungseong yae */
1018 + 0x0031, /* 0x48 H: 0 */
1019 + 0x1164, /* 0x49 I: 7 */
1020 + 0x11bf, /* 0x4A J: 1 */
1021 + 0x11aa, /* 0x4B K: 2 */
1022 + 0x0039, /* 0x4C L: 3 */
1023 + 0x0022, /* 0x4D M: double quotation mark */
1024 + 0x0033, /* 0x4E N: minus sign */
1025 + 0x11ad, /* 0x4F O: 8 */
1026 + 0x11b6, /* 0x50 P: 9 */
1027 + 0x11b9, /* 0x51 Q: jongseong phieuph */
1028 + 0x0038, /* 0x52 R: jongseong rieul-hieuh */
1029 + 0x0034, /* 0x53 S: jongseong nieun-hieuh */
1030 + 0x0032, /* 0x54 T: jongseong rieul-sios */
1031 + 0x11b1, /* 0x55 U: 6 */
1032 + 0x002e, /* 0x56 V: jongseong kiyeok-sios */
1033 + 0x002c, /* 0x57 W: jongseong thikeuth */
1034 + 0x003f, /* 0x58 X: jongseong pieup-sios */
1035 + 0x11b3, /* 0x59 Y: 5 */
1036 + 0x0021, /* 0x5A Z: jongseong chieuch */
1037 + 0x0029, /* [ 0x5B bracketleft: left parenthesis */
1038 + 0x003a, /* \ 0x5C backslash: colon */
1039 + 0x003e, /* ] 0x5D bracketright: less-than sign */
1040 + 0x003d, /* ^ 0x5E asciicircum: equals sign */
1041 + 0x00b7, /* _ 0x5F underscore: semicolon */
1042 + 0x002a, /* ` 0x60 quoteleft: asterisk */
1043 + 0x11bc, /* 0x61 a: jongseong ieung */
1044 + 0x1109, /* 0x62 b: jungseong u */
1045 + 0x1106, /* 0x63 c: jungseong e */
1046 + 0x1102, /* 0x64 d: jungseong i */
1047 + 0x1175, /* 0x65 e: jungseong yeo */
1048 + 0x1105, /* 0x66 f: jungseong a */
1049 + 0x1103, /* 0x67 g: jungseong eu */
1050 + 0x110b, /* 0x68 h: choseong nieun */
1051 + 0x1173, /* 0x69 i: choseong mieum */
1052 + 0x1166, /* 0x6A j: choseong ieung */
1053 + 0x1169, /* 0x6B k: choseong kiyeok */
1054 + 0x1111, /* 0x6C l: choseong cieuc */
1055 + 0x1112, /* 0x6D m: choseong hieuh */
1056 + 0x110c, /* 0x6E n: choseong sios */
1057 + 0x11ab, /* 0x6F o: choseong chieuch */
1058 + 0x1162, /* 0x70 p: choseong phieuph */
1059 + 0x11a8, /* 0x71 q: jongseong sios */
1060 + 0x110e, /* 0x72 r: jungseong ae */
1061 + 0x1107, /* 0x73 s: jongseong nieun */
1062 + 0x1100, /* 0x74 t: jungseong eo */
1063 + 0x1161, /* 0x75 u: choseong tikeut */
1064 + 0x002e, /* 0x76 v: jungseong o */
1065 + 0x002c, /* 0x77 w: jongseong rieul */
1066 + 0x116e, /* 0x78 x: jongseong kiyeok */
1067 + 0x1165, /* 0x79 y: choseong rieul */
1068 + 0x1169, /* 0x7A z: jongseong mieum */
1069 + 0x003b, /* { 0x7B braceleft: percent sign */
1070 + 0x005c, /* | 0x7C bar: backslash */
1071 + 0x002b, /* } 0x7D braceright: slash */
1072 + 0x203b, /* ~ 0x7E asciitilde: reference mark */
1073 + 0x0000 /* 0x7F delete */
1076 +static const ucschar hangul_keyboard_table_3ahnmatae[] = {
1077 + 0x0000 , /* 0x00 : Null */
1078 + 0x0000 , /* 0x01 : start of heading */
1079 + 0x0000 , /* 0x02 : start of text */
1080 + 0x0000 , /* 0x03 : end of text */
1081 + 0x0000 , /* 0x04 : end of transmission */
1082 + 0x0000 , /* 0x05 : Enquiry */
1083 + 0x0000 , /* 0x06 : Acknowledge */
1084 + 0x0000 , /* 0x07 : Bell */
1085 + 0x0000 , /* 0x08 : Backspace */
1086 + 0x0000 , /* 0x09 : character tabulation */
1087 + 0x0000 , /* 0x0A : line feed (lf) */
1088 + 0x0000 , /* 0x0B : line tabulation */
1089 + 0x0000 , /* 0x0C : form feed (ff) */
1090 + 0x0000 , /* 0x0D : carriage return (cr) */
1091 + 0x0000 , /* 0x0E : shift out */
1092 + 0x0000 , /* 0x0F : shift in */
1093 + 0x0000 , /* 0x10 : data link escape */
1094 + 0x0000 , /* 0x11 : device control one */
1095 + 0x0000 , /* 0x12 : device control two */
1096 + 0x0000 , /* 0x13 : device control three */
1097 + 0x0000 , /* 0x14 : device control four */
1098 + 0x0000 , /* 0x15 : negative acknowledge */
1099 + 0x0000 , /* 0x16 : synchronous idle */
1100 + 0x0000 , /* 0x17 : end of transmission block */
1101 + 0x0000 , /* 0x18 : Cancel */
1102 + 0x0000 , /* 0x19 : end of medium */
1103 + 0x0000 , /* 0x1A : Substitute */
1104 + 0x0000 , /* 0x1B : Escape */
1105 + 0x0000 , /* 0x1C : information separator four */
1106 + 0x0000 , /* 0x1D : information separator three */
1107 + 0x0000 , /* 0x1E : information separator two */
1108 + 0x0000 , /* 0x1F : information separator one */
1109 + 0x0000 , /* 0x20 : Space */
1110 + 0x0021 , /* ! */ /* 0x21 : exclam = exclamation mark */
1111 + 0x0022 , /* " */ /* 0x22 : quotedbl = quotation mark */
1112 + 0x0023 , /* # */ /* 0x23 : numbersign = number sign */
1113 + 0x0024 , /* $ */ /* 0x24 : dollar = dollar sign */
1114 + 0x0025 , /* % */ /* 0x25 : percent = percent sign */
1115 + 0x0026 , /* & */ /* 0x26 : ampersand = ampersand */
1116 + 0x002e , /* ' */ /* 0x27 : apostrophe = Period */
1117 + 0x0028 , /* ( */ /* 0x28 : parenleft = left parenthesis */
1118 + 0x0029 , /* ) */ /* 0x29 : parenright = right parenthesis */
1119 + 0x002a , /* * */ /* 0x2A : asterisk = asterisk */
1120 + 0x002b , /* */ /* 0x2B : plus = plus sign */
1121 + 0x11b7 , /* , */ /* 0x2C : comma = jongseong mieum */
1122 + 0x002d , /* - */ /* 0x2D : minus = minus sign */
1123 + 0x11af , /* . */ /* 0x2E : period = jongseong rieul */
1124 + 0x11c2 , /* / */ /* 0x2F : slash = jongseong hieuh */
1125 + 0x0030 , /* 0 */ /* 0x30 : 0 = 0 */
1126 + 0x0031 , /* 1 */ /* 0x31 : 1 = 1 */
1127 + 0x0032 , /* 2 */ /* 0x32 : 2 = 2 */
1128 + 0x0033 , /* 3 */ /* 0x33 : 3 = 3 */
1129 + 0x0034 , /* 4 */ /* 0x34 : 4 = 4 */
1130 + 0x0035 , /* 5 */ /* 0x35 : 5 = 5 */
1131 + 0x0036 , /* 6 */ /* 0x36 : 6 = 6 */
1132 + 0x0037 , /* 7 */ /* 0x37 : 7 = 7 */
1133 + 0x0038 , /* 8 */ /* 0x38 : 8 = 8 */
1134 + 0x0039 , /* 9 */ /* 0x39 : 9 = 9 */
1135 + 0x003a , /* : */ /* 0x3A : colon = colon */
1136 + 0x116e , /* ; */ /* 0x3B : semicolon = jungseong u */
1137 + 0x003c , /* < */ /* 0x3C : less = less-than sign */
1138 + 0x003d , /* = */ /* 0x3D : equal = equals sign */
1139 + 0x003e , /* > */ /* 0x3E : greater = greater-than sign */
1140 + 0x11f9 , /* ? */ /* 0x3F : question = jongseong yet hieuh */
1141 + 0x0040 , /* @ */ /* 0x40 : at = commercial at */
1142 + 0x1111 , /* A */ /* 0x41 : A = choseong phieuph */
1143 + 0x11f0 , /* B */ /* 0x42 : B = jongseong yet ieung */
1144 + 0x11c1 , /* C */ /* 0x43 : C = jongseong phieuph */
1145 + 0x1110 , /* D */ /* 0x44 : D = choseong thieuth */
1146 + 0x201c , /* E */ /* 0x45 : E = - (quotadouble left) */
1147 + 0x110f , /* F */ /* 0x46 : F = choseong khiyeok */
1148 + 0x114c , /* G */ /* 0x47 : G = choseong yet ieung */
1149 + 0x00b7 , /* H */ /* 0x48 : H = middle dot */
1150 + 0x002f , /* I */ /* 0x49 : I = slash */
1151 + 0x119e , /* J */ /* 0x4A : J = jungseong araea */
1152 + 0x2018 , /* K */ /* 0x4B : K = - (quota left) */
1153 + 0x2019 , /* L */ /* 0x4C : L = - (quota right) */
1154 + 0x00b1 , /* M */ /* 0x4D : M = - (plus-minux sign) */
1155 + 0x11eb , /* N */ /* 0x4E : N = jongsung ban siot */
1156 + 0x005b , /* O */ /* 0x4F : O = [ */
1157 + 0x005d , /* P */ /* 0x50 : P = ] */
1158 + 0x203b , /* Q */ /* 0x51 : Q = dangujang mark */
1159 + 0x201d , /* R */ /* 0x52 : R = - (quotadouble right) */
1160 + 0x110e , /* S */ /* 0x53 : S = choseong chieoch */
1161 + 0x1159 , /* T */ /* 0x54 : T = chosung yet hiheuh */
1162 + 0x0027 , /* U */ /* 0x55 : U = apostrophe */
1163 + 0x11bf , /* V */ /* 0x56 : V = jongseong khiyeok */
1164 + 0x1140 , /* W */ /* 0x57 : W = chosung ban siot */
1165 + 0x11c0 , /* X */ /* 0x58 : X = jongseong thieuth */
1166 + 0x003b , /* Y */ /* 0x59 : Y = semicolon */
1167 + 0x11be , /* Z */ /* 0x5A : Z = jongseong chieoch */
1168 + 0x002c , /* [ */ /* 0x5B : bracketleft = comma */
1169 + 0x005c , /* \ */ /* 0x5C : backslash = backslash */
1170 + 0x003f , /* ] */ /* 0x5D : bracketright = qustion mark */
1171 + 0x005e , /* ^ */ /* 0x5E : asciicircum = circumflex accent */
1172 + 0x005f , /* _ */ /* 0x5F : underscore = underscore */
1173 + 0x0060 , /* ` */ /* 0x60 : quoteleft = grave accent */
1174 + 0x1107 , /* a */ /* 0x61 : a = choseong pieup */
1175 + 0x11bc , /* b */ /* 0x62 : b = jongseong ieung */
1176 + 0x11b8 , /* c */ /* 0x63 : c = jongseong pieup */
1177 + 0x1103 , /* d */ /* 0x64 : d = choseong digeud */
1178 + 0x1102 , /* e */ /* 0x65 : e = choseong nieun */
1179 + 0x1100 , /* f */ /* 0x66 : f = choseong kiyeok */
1180 + 0x110b , /* g */ /* 0x67 : g = choseong ieung */
1181 + 0x1165 , /* h */ /* 0x68 : h = jungseong eo */
1182 + 0x1173 , /* i */ /* 0x69 : i = jungseong eu */
1183 + 0x1161 , /* j */ /* 0x6A : j = jungseong a */
1184 + 0x1175 , /* k */ /* 0x6B : k = jungseong i */
1185 + 0x1169 , /* l */ /* 0x6C : l = jungseong o */
1186 + 0x11ab , /* m */ /* 0x6D : m = jongseong nieun */
1187 + 0x11ba , /* n */ /* 0x6E : n = jongseong siot */
1188 + 0x116d , /* o */ /* 0x6F : o = jungseong yo */
1189 + 0x1172 , /* p */ /* 0x70 : p = jungseong yu */
1190 + 0x1106 , /* q */ /* 0x71 : q = choseong mieum */
1191 + 0x1105 , /* r */ /* 0x72 : r = choseong rieul */
1192 + 0x110c , /* s */ /* 0x73 : s = choseong jieut */
1193 + 0x1112 , /* t */ /* 0x74 : t = choseong hieuh */
1194 + 0x1163 , /* u */ /* 0x75 : u = jungseong ya */
1195 + 0x11a8 , /* v */ /* 0x76 : v = jongseong kiyok */
1196 + 0x1109 , /* w */ /* 0x77 : w = choseong siot */
1197 + 0x11ae , /* x */ /* 0x78 : x = jongseong digeut */
1198 + 0x1167 , /* y */ /* 0x79 : y = jungseong yeo */
1199 + 0x11bd , /* z */ /* 0x7A : z = jongseong jieut */
1200 + 0x007b , /* { */ /* 0x7B : braceleft = left brace */
1201 + 0x007c , /* | */ /* 0x7C : bar = vertical bar */
1202 + 0x007d , /* } */ /* 0x7D : braceright = right brace */
1203 + 0x007e , /* ~ */ /* 0x7E : asciitilde = Tilde */
1204 + 0x0000 /* 0x7F : delete */
1208 +static const HangulCombinationItem hangul_combination_table_3ahnmatae[] = {
1209 +/* need sort
1210 + { 0x1100110b, 0x1101 }, /* choseong kiyeok kiyeok = ssangkiyeok **
1211 + { 0x110b1100, 0x1101 }, /* choseong kiyeok kiyeok = ssangkiyeok **
1213 + { 0x11031100, 0x1104 }, /* choseong tikeut tikeut = ssangtikeut **
1214 + { 0x11001103, 0x1104 }, /* choseong tikeut tikeut = ssangtikeut **
1216 + { 0x1107110c, 0x1108 }, /* choseong pieup pieup = ssangpieup **
1217 + { 0x110c1107, 0x1108 }, /* choseong pieup pieup = ssangpieup **
1219 + { 0x11091102, 0x110a }, /* choseong sios sios = ssangsios **
1220 + { 0x11021109, 0x110a }, /* choseong sios sios = ssangsios **
1222 + { 0x110c1103, 0x110d }, /* choseong cieuc cieuc = ssangcieuc **
1223 + { 0x1103110c, 0x110d }, /* choseong cieuc cieuc = ssangcieuc **
1225 + { 0x1112110c, 0x110e }, /* choseong ch **
1226 + { 0x110c1112, 0x110e }, /* choseong **
1228 + { 0x11121100, 0x110f }, /* choseong k **
1229 + { 0x11001112, 0x110f }, /* choseong **
1231 + { 0x11121103, 0x1110 }, /* choseong t **
1232 + { 0x11031112, 0x1110 }, /* choseong **
1234 + { 0x11121107, 0x1111 }, /* choseong p **
1235 + { 0x11071112, 0x1111 }, /* choseong **
1237 +/// 1
1238 + { 0x11691161, 0x116a }, /* jungseong o a = wa **
1239 + { 0x11611169, 0x116a }, /* jungseong o a = wa **
1241 + /*` 1169 1161 1175 jungseong o ae = wae **
1243 + { 0x11691175, 0x116c }, /* jungseong o i = oe **
1244 + { 0x11751169, 0x116c }, /* jungseong o i = oe **
1246 + { 0x116e1165, 0x116f }, /* jungseong u eo = weo **
1247 + { 0x1165116e, 0x116f }, /* jungseong u eo = weo **
1249 + /*` 116e 1165 1175 jungseong u e = we **
1251 + { 0x116e1175, 0x1171 }, /* jungseong u i = wi **
1252 + { 0x1175116e, 0x1171 }, /* jungseong u i = wi **
1254 + { 0x11731175, 0x1174 }, /* jungseong eu i = yi **
1255 + { 0x11751173, 0x1174 }, /* jungseong eu i = yi **
1257 + { 0x11611175, 0x1162 }, /* jungseong ae **
1258 + { 0x11751161, 0x1162 }, /* jungseong **
1260 + { 0x11631175, 0x1164 }, /* jungseong yae **
1261 + { 0x11751163, 0x1164 }, /* jungseong **
1263 + { 0x11651175, 0x1166 }, /* jungseong e **
1264 + { 0x11751165, 0x1166 }, /* jungseong **
1266 + { 0x11671175, 0x1168 }, /* jungseong ye **
1267 + { 0x11751167, 0x1168 }, /* jungseong **
1268 +/// jong
1269 + { 0x11a811bc, 0x11a9 }, /* jongseong kiyeok kiyeok = ssangekiyeok **
1270 + { 0x11bc11a8, 0x11a9 }, /* jongseong kiyeok kiyeok = ssangekiyeok **
1272 + { 0x11a811ba, 0x11aa }, /* jongseong kiyeok sios = kiyeok-sois **
1273 + { 0x11ba11a8, 0x11aa }, /* jongseong kiyeok sios = kiyeok-sois **
1275 + { 0x11ab11bd, 0x11ac }, /* jongseong nieun cieuc = nieun-cieuc **
1276 + { 0x11bd11ab, 0x11ac }, /* jongseong nieun cieuc = nieun-cieuc **
1278 + { 0x11ab11c2, 0x11ad }, /* jongseong nieun hieuh = nieun-hieuh **
1279 + { 0x11c211ab, 0x11ad }, /* jongseong nieun hieuh = nieun-hieuh **
1281 + { 0x11af11a8, 0x11b0 }, /* jongseong rieul kiyeok = rieul-kiyeok **
1282 + { 0x11a811af, 0x11b0 }, /* jongseong rieul kiyeok = rieul-kiyeok **
1284 + { 0x11af11ae, 0x11ce }, /*`` r d **
1285 + { 0x11ae11af, 0x11ce }, /*`` r d **
1287 + { 0x11af11b7, 0x11b1 }, /* jongseong rieul mieum = rieul-mieum **
1288 + { 0x11b711af, 0x11b1 }, /* jongseong rieul mieum = rieul-mieum **
1290 + { 0x11af11b8, 0x11b2 }, /* jongseong rieul pieup = rieul-pieup **
1291 + { 0x11b811af, 0x11b2 }, /* jongseong rieul pieup = rieul-pieup **
1293 + { 0x11af11ba, 0x11b3 }, /* jongseong rieul sios = rieul-sios **
1294 + { 0x11ba11af, 0x11b3 }, /* jongseong rieul sios = rieul-sios **
1296 + { 0x11af11c2, 0x11b6 }, /* jongseong rieul hieuh = rieul-hieuh **
1297 + { 0x11c211af, 0x11b6 }, /* jongseong rieul hieuh = rieul-hieuh **
1299 + { 0x11b811ba, 0x11b9 }, /* jongseong pieup sios = pieup-sios **
1300 + { 0x11ba11b8, 0x11b9 }, /* jongseong pieup sios = pieup-sios **
1302 + { 0x11ba11ab, 0x11bb }, /* jongseong sios sios = ssangsios **
1303 + { 0x11ab11ba, 0x11bb }, /* jongseong sios sios = ssangsios **
1305 + { 0x11c211bd, 0x11be }, /* jongseong ch **
1306 + { 0x11bd11c2, 0x11be }, /* jongseong **
1308 + { 0x11c211a8, 0x11bf }, /* jongseong k **
1309 + { 0x11a811c2, 0x11bf }, /* jongseong **
1311 + { 0x11c211ae, 0x11c0 }, /* jongseong t **
1312 + { 0x11ae11c2, 0x11c0 }, /* jongseong **
1314 + { 0x11c211b8, 0x11c1 }, /* jongseong p **
1315 + { 0x11b811c2, 0x11c1 }, /* jongseong **
1317 + { 0x1100110b, 0x1101 }, /* choseong kiyeok kiyeok = ssangkiyeok **
1318 + { 0x110b1100, 0x1101 }, /* choseong kiyeok kiyeok = ssangkiyeok **
1320 + { 0x11031100, 0x1104 }, /* choseong tikeut tikeut = ssangtikeut **
1321 + { 0x11001103, 0x1104 }, /* choseong tikeut tikeut = ssangtikeut **
1323 + { 0x1107110c, 0x1108 }, /* choseong pieup pieup = ssangpieup **
1324 + { 0x110c1107, 0x1108 }, /* choseong pieup pieup = ssangpieup **
1326 + { 0x11091102, 0x110a }, /* choseong sios sios = ssangsios **
1327 + { 0x11021109, 0x110a }, /* choseong sios sios = ssangsios **
1329 + { 0x110c1103, 0x110d }, /* choseong cieuc cieuc = ssangcieuc **
1330 + { 0x1103110c, 0x110d }, /* choseong cieuc cieuc = ssangcieuc **
1332 + /// 3jung
1333 + { 0x11b611ae, 0x11b4 }, /*`` rh d -> rt **
1334 + { 0x11ce11c2, 0x11b4 }, /*`` rd h -> rt **
1335 + { 0x11c011af, 0x11b4 }, /* t r -> rt
1337 + { 0x11b611b8, 0x11b5 }, /*`` rh b -> rp **
1338 + { 0x11b211c2, 0x11b5 }, /*`` rb h -> rp **
1339 + { 0x11c111af, 0x11b5 }, /* p r -> rp
1341 + { 0x116a1175, 0x116b}, /* oa ao, i **
1342 + { 0x116c1161, 0x116b}, /* oi io, a **
1343 + { 0x11621169, 0x116b}, /* ae ea, o **
1345 + { 0x116f1175, 0x1170}, /* ueo, i **
1346 + { 0x11711165, 0x1170}, /* ui, eo **
1347 + { 0x1166116e, 0x1170}, /* e, u **
1349 +///// ì°¸ê? ref.
1350 + ??= o a i
1351 + ??= u
1352 + ??= r h d,
1353 + ??= r h b
1356 + { 0x11001100 , 0x110f } , /* choseong kiyeok kiyeok khiyeokh */
1357 + { 0x11001103 , 0x1104 } , /* choseong kiyeok tikeut ssangtikeut */
1358 + { 0x1100110b , 0x1101 } , /* choseong kiyeok ieung ssangkiyeok */
1359 + { 0x11001112 , 0x110f } , /* choseong kiyeok hieuh khiyeokh */
1360 +// { 0x11021102 , 0x201c } , /* - (quotadouble left) */
1361 + { 0x11021109 , 0x110a } , /* choseong nieun sios ssangsios */
1362 + { 0x11031100 , 0x1104 } , /* choseong tikeut kiyeok ssangtikeut */
1363 + { 0x11031103 , 0x1110 } , /* choseong tieut tieut thieuth */
1364 + { 0x1103110c , 0x110d } , /* choseong tieut cieuc ssangcieuc */
1365 + { 0x11031112 , 0x1110 } , /* choseong tieut hieuh thieuth */
1366 +// { 0x11051105 , 0x201d } , /* - (quotadouble right) */
1367 +// { 0x11061106 , 0x203b } , /* dangujang mark */
1368 + { 0x11071107 , 0x1111 } , /* choseong pieup pieup phieuph */
1369 + { 0x1107110c , 0x1108 } , /* choseong pieup cieuc ssangpieup */
1370 + { 0x11071112 , 0x1111 } , /* choseong pieup hieuh phieuph */
1371 + { 0x11091102 , 0x110a } , /* choseong sios nieun ssangsios */
1372 +// { 0x11091109 , 0x1140 } , /* */
1373 + { 0x110b1100 , 0x1101 } , /* choseong ieung kiyeok ssangkiyeok */
1374 + { 0x110c1103 , 0x110d } , /* choseong cieuc tikeut ssangcieuc */
1375 + { 0x110c1107 , 0x1108 } , /* choseong cieuc pieup ssangpieup */
1376 + { 0x110c110c , 0x110e } , /* choseong cieuc cieuc chieuch */
1377 + { 0x110c1112 , 0x110e } , /* choseong cieuc hieuh chieuch */
1378 + { 0x11121100 , 0x110f } , /* choseong hieuh kiyeok khiyeokh */
1379 + { 0x11121103 , 0x1110 } , /* choseong hieuh tikeut thikeuth */
1380 + { 0x11121107 , 0x1111 } , /* choseong hieuh pieup phieuph */
1381 + { 0x1112110c , 0x110e } , /* choseong hieuh cieuc chieuch */
1382 +// { 0x11611161 , 0x119e } , /* arae a */
1383 + { 0x11611169 , 0x116a } , /* jungseong a o wa */
1384 + { 0x11611175 , 0x1162 } , /* jungseong a i ae */
1385 + { 0x11621169 , 0x116b } , /* ae o oae */
1386 +// { 0x11631163 , 0x0027 } , /* quota */
1387 + { 0x11631175 , 0x1164 } , /* jungseong ya i yae */
1388 +// { 0x11651165 , 0x00b7 } , /* middle dot */
1389 + { 0x1165116e , 0x116f } , /* jungseong eo u weo */
1390 + { 0x11651175 , 0x1166 } , /* jungseong eo i e */
1391 + { 0x1166116e , 0x1170 } , /* e u wyeo */
1392 +// { 0x11671167 , 0x003b } , /* semicolon */
1393 + { 0x11671175 , 0x1168 } , /* jungseong yeo i ye */
1394 + { 0x11691161 , 0x116a } , /* jungseong o a wa */
1395 +// { 0x11691169 , 0x2019 } , /* quota right */
1396 + { 0x11691175 , 0x116c } , /* jungseong o i oe */
1397 + { 0x116a1175 , 0x116b } , /* oa i oae */
1398 + { 0x116c1161 , 0x116b } , /* Oi a oae */
1399 +// { 0x116c116c , 0x005b } , /* [ */
1400 + { 0x116e1165 , 0x116f } , /* jungseong u eo weo */
1401 +// { 0x116e116e , 0x003a } , /* colon */
1402 + { 0x116e1175 , 0x1171 } , /* jungseong u i wi */
1403 + { 0x116f1175 , 0x1170 } , /* Ueo I wyeo */
1404 + { 0x11711165 , 0x1170 } , /* Ui eo wyeo */
1405 +// { 0x11721172 , 0x005d } , /* ] */
1406 +// { 0x11731173 , 0x002f } , /* slash */
1407 + { 0x11731175 , 0x1174 } , /* jungseong eu i yi */
1408 + { 0x11751161 , 0x1162 } , /* jungseong I a ae */
1409 + { 0x11751163 , 0x1164 } , /* jungseong I ya yae */
1410 + { 0x11751165 , 0x1166 } , /* jungseong I eo e */
1411 + { 0x11751167 , 0x1168 } , /* jungseong I yeo ye */
1412 + { 0x11751169 , 0x116c } , /* jungseong o i oe */
1413 + { 0x1175116e , 0x1171 } , /* jungseong u i wi */
1414 + { 0x11751173 , 0x1174 } , /* jungseong eu i yi */
1415 +// { 0x11751175 , 0x2018 } , /* quota left */
1416 + { 0x11a811a8 , 0x11bf } , /* jongseong k k khiyeokh */
1417 + { 0x11a811af , 0x11b0 } , /* jongseong rieul kiyeok rieul-kiyeok */
1418 + { 0x11a811ba , 0x11aa } , /* jongseong kiyeok sios kiyeok-sois */
1419 + { 0x11a811bc , 0x11a9 } , /* jongseong kiyeok ieung ssangekiyeok */
1420 + { 0x11a811c2 , 0x11bf } , /* jongseong kiyeok hieuh */
1421 +// { 0x11ab11ab , 0x00b1 } , /* Plus-minus sign */
1422 + { 0x11ab11ba , 0x11bb } , /* jongseong sios sios ssangsios */
1423 + { 0x11ab11bd , 0x11ac } , /* jongseong nieun cieuc nieun-cieuc */
1424 + { 0x11ab11c2 , 0x11ad } , /* jongseong nieun hieuh nieun-hieuh */
1425 + { 0x11ae11ae , 0x11c0 } , /* jongseong t t thieuth */
1426 + { 0x11ae11af , 0x11ce } , /* r d */
1427 + { 0x11ae11c2 , 0x11c0 } , /* jongseong */
1428 + { 0x11af11a8 , 0x11b0 } , /* jongseong rieul kiyeok rieul-kiyeok */
1429 + { 0x11af11ae , 0x11ce } , /* r d */
1430 +// { 0x11af11af , 0x003e } , /* Great-than */
1431 + { 0x11af11b7 , 0x11b1 } , /* jongseong rieul mieum rieul-mieum */
1432 + { 0x11af11b8 , 0x11b2 } , /* jongseong rieul pieup rieul-pieup */
1433 + { 0x11af11ba , 0x11b3 } , /* jongseong rieul sios rieul-sios */
1434 + { 0x11af11c2 , 0x11b6 } , /* jongseong rieul hieuh rieul-hieuh */
1435 + { 0x11b211c2 , 0x11b5 } , /* rb h -> rp */
1436 + { 0x11b611ae , 0x11b4 } , /* rh d -> rt */
1437 + { 0x11b611b8 , 0x11b5 } , /* rh b -> rp */
1438 + { 0x11b711af , 0x11b1 } , /* jongseong rieul mieum rieul-mieum */
1439 +// { 0x11b711b7 , 0x003c } , /* Less-than */
1440 + { 0x11b811af , 0x11b2 } , /* jongseong rieul pieup rieul-pieup */
1441 + { 0x11b811b8 , 0x11c1 } , /* jongseong p p phieuph */
1442 + { 0x11b811ba , 0x11b9 } , /* jongseong pieup sios pieup-sios */
1443 + { 0x11b811c2 , 0x11c1 } , /* jongseong */
1444 + { 0x11ba11a8 , 0x11aa } , /* jongseong kiyeok sios kiyeok-sois */
1445 + { 0x11ba11ab , 0x11bb } , /* jongseong sios sios ssangsios */
1446 + { 0x11ba11af , 0x11b3 } , /* jongseong rieul sios rieul-sios */
1447 + { 0x11ba11b8 , 0x11b9 } , /* jongseong pieup sios pieup-sios */
1448 +// { 0x11ba11ba , 0x11eb } , /* jongseong ban sios */
1449 + { 0x11bc11a8 , 0x11a9 } , /* jongseong kiyeok kiyeok ssangekiyeok */
1450 +// { 0x11bc11bc , 0x11f0 } , /* jongseong yet ieung */
1451 + { 0x11bd11ab , 0x11ac } , /* jongseong nieun cieuc nieun-cieuc */
1452 + { 0x11bd11bd , 0x11be } , /* jongseong c c chieuch */
1453 + { 0x11bd11c2 , 0x11be } , /* jongseong */
1454 + { 0x11c011af , 0x11b4 } , /* t r -> rt */
1455 + { 0x11c111af , 0x11b5 } , /* p r -> rp */
1456 + { 0x11c211a8 , 0x11bf } , /* jongseong k */
1457 + { 0x11c211ab , 0x11ad } , /* jongseong nieun hieuh nieun-hieuh */
1458 + { 0x11c211ae , 0x11c0 } , /* jongseong t */
1459 + { 0x11c211af , 0x11b6 } , /* jongseong rieul hieuh rieul-hieuh */
1460 + { 0x11c211b8 , 0x11c1 } , /* jongseong p */
1461 + { 0x11c211bd , 0x11be } , /* jongseong ch */
1462 +// { 0x11c211c2 , 0x11f9 } , /* jongseong yet hieuh */
1463 + { 0x11ce11c2 , 0x11b4 } , /* rd h -> rt */
1466 static const ucschar hangul_keyboard_table_2[] = {
1467 0x0000, /* 0x00 null */
1468 0x0000, /* 0x01 start of heading */
1469 --- libhangul-0.1.0.orig/hangul/hangulctype.c
1470 +++ libhangul-0.1.0/hangul/hangulctype.c
1471 @@ -881,6 +881,79 @@ hangul_jongseong_to_choseong(ucschar c)
1472 return 0;
1475 +ucschar
1476 +hangul_shin_choseong_to_shin_jungseong(ucschar c)
1478 + static ucschar table[] = {
1479 + 0x1100, /* choseong kiyeok */
1480 + 0x1101, /* choseong ssangkiyeok */
1481 + 0x1102, /* choseong nieun */
1482 + 0x1103, /* choseong tikeut */
1483 + 0x1104, /* choseong ssangtikeut */
1484 + 0x1105, /* choseong rieul */
1485 + 0x1174, /* choseong mieum ㅁ -> ㅢ */
1486 + 0x1107, /* choseong pieup */
1487 + 0x1108, /* choseong ssangpieup */
1488 + 0x1109, /* choseong sios */
1489 + 0x110a, /* choseong ssangsios */
1490 + 0x110b, /* choseong ieung */
1491 + 0x110c, /* choseong cieuc */
1492 + 0x110d, /* choseong ssangcieuc */
1493 + 0x116e, /* choseong chieuch ㅊ -> ㅜ */
1494 + 0x110f, /* choseong khieukh */
1495 + 0x1110, /* choseong thieuth */
1496 + 0x1169, /* choseong phieuph ㅍ -> ㅗ */
1497 + 0x1112 /* choseong hieuh */
1498 + };
1499 + if (c < 0x1100 || c > 0x1112)
1500 + return 0;
1501 + else if(!(c == 0x1106 || c == 0x110e || c == 0x1111))
1502 + return 0;
1503 + else
1504 + return table[c - 0x1100];
1507 +ucschar
1508 +hangul_shin_jongseong_to_shin_jungseong(ucschar c)
1510 + static ucschar table[] = {
1511 + 0x116d, /* jongseong kiyeok -> jungseong yo */
1512 + 0x11a9, /* jongseong ssangkiyeok -> */
1513 + 0x11aa, /* jongseong kiyeok-sios -> */
1514 + 0x1168, /* jongseong nieun -> jungseong ye */
1515 + 0x11ac, /* jongseong nieun-cieuc -> */
1516 + 0x11ad, /* jongseong nieun-hieuh -> */
1517 + 0x1175, /* jongseong tikeut -> jungseong i */
1518 + 0x1163, /* jongseong rieul -> jungseong ya */
1519 + 0x11b0, /* jongseong rieul-kiyeok -> */
1520 + 0x11b1, /* jongseong rieul-mieum -> */
1521 + 0x11b2, /* jongseong rieul-pieup -> */
1522 + 0x11b3, /* jongseong rieul-sios -> */
1523 + 0x11b4, /* jongseong rieul-thieuth -> */
1524 + 0x11b5, /* jongseong rieul-phieuph -> */
1525 + 0x11b6, /* jongseong rieul-hieuh -> */
1526 + 0x11b7, /* jongseong mieum -> */
1527 + 0x1167, /* jongseong pieup -> jungseong yeo */
1528 + 0x11b9, /* jongseong pieup-sios -> */
1529 + 0x1164, /* jongseong sios -> jungseong yae */
1530 + 0x1161, /* jongseong ssangsios -> jungseong a */
1531 + 0x1172, /* jongseong ieung -> jungseong yu */
1532 + 0x1173, /* jongseong cieuc -> jungseong eu */
1533 + 0x1166, /* jongseong chieuch -> jungseong e */
1534 + 0x116e, /* jongseong khieukh -> jungseong u */
1535 + 0x1162, /* jongseong thieuth -> jungseong ae */
1536 + 0x1165, /* jongseong phieuph -> jungseong eo */
1537 + 0x1169 /* jongseong hieuh -> jungseong o */
1538 + };
1539 + if (c < 0x11a8 || c > 0x11c2)
1540 + return 0;
1541 + else if(c == 0x11a9 || c == 0x11aa || c == 0x11ac || c == 0x11ad || c == 0x11b0 || c == 0x11b1 || c == 0x11b2 || c == 0x11b3 || c == 0x11b4 || c == 0x11b5 || c == 0x11b6 || c == 0x11b7 || c == 0x11b9)
1542 + return 0;
1543 + else
1544 + return table[c - 0x11a8];
1548 void
1549 hangul_jongseong_decompose(ucschar c, ucschar* jong, ucschar* cho)