[tool] 行列文字解碼
0. 輸入法的拆字查詢不應該只列出對應的按鍵(A-Z)
而應該列出字根, 行列的書籍有這個列表。
最近剛好發現行列 CAI 有這個電子版本的表格。
要注意 "大夫雨" 這三個字根可用 18 加上 offset (62, 68, 6f)
來分別, 可以畫出跟書上一樣的字根表。
1. 下載行列輸入法視窗版教學CAI
http://www.array.com.tw/BOX/ARCAI-T.exe
內含 AR.TAB
2. 解碼:
53016 bytes AR.TAB
3*16*16 = 768
768+8 = 776
13060*4 = 52240
53016-52240 = 776
File : ar.tab Size : 53016 bytes 1%
00000000: 04 00 FF 00 04 33 08 03 20 42 4D 58 58 58 53 42 . ? .3.. BMXXXSB
00000010: 43 43 2E 2E 2C 46 52 46 4B 4F 49 4E 43 59 4E 42 CC..,FRFKOINCYNB
00000020: 4B 51 5A 45 54 4A 5A 51 45 45 45 45 4F 46 46 2E KQZETJZQEEEEOFF.
00000030: 53 45 43 4C 53 57 47 4F 4F 54 51 4E 45 54 53 2E SECLSWGOOTQNETS.
00000040: 2E 51 4C 47 47 47 2E 58 58 4A 57 50 2F 4D 44 53 .QLGGG.XXJWP/MDS
00000050: 55 53 53 44 4F 4E 4A 51 48 2F 56 44 4F 44 44 51 USSDONJQH/VDODDQ
00000060: 53 5A 2C 4B 5A 4C 2E 46 49 46 5A 54 54 54 54 4F SZ,KZL.FIFZTTTTO
00000070: 5A 59 57 50 48 4B 52 5A 43 43 43 59 4B 5A 52 52 ZYWPHKRZCCCYKZRR
00000080: 52 52 58 41 55 57 57 2E 4F 58 2F 4B 51 48 53 51 RRXAUWW.OX/KQHSQ
00000090: 45 58 42 2E 4C 4C 58 50 50 47 2F 5A 52 5A 45 42 EXB.LLXPPG/ZRZEB
000000A0: 51 4E 50 4F 51 3B 45 53 4A 55 2F 2F 5A 2F 43 44 QNPOQ;ESJU//Z/CD
000000B0: 4F 51 43 47 43 2F 4F 4F 41 45 44 5A 50 43 45 52 OQCGC/OOAEDZPCER
000000C0: 52 52 46 46 46 56 47 47 51 44 42 42 42 50 59 4D RRFFFVGGQDBBBPYM
000000D0: 59 48 4E 4C 4F 4F 4E 53 5A 55 4F 4A 58 51 2E 2E YHNLOONSZUOJXQ..
000000E0: 2C 44 4D 42 42 45 55 45 4D 2E 49 4F 45 58 47 45 ,DMBBEUEM.IOEXGE
000000F0: 52 4D 50 45 56 51 49 59 49 51 45 59 58 4A 4A 4D RMPEVQIYIQEYXJJM
00000100: 49 49 4B 4B 4B 2C 2C 4F 20 20 35 38 37 38 32 36 IIKKK,,O 587826
00000110: 32 39 32 36 32 2D 35 38 33 38 33 38 39 38 39 38 29262-5838389898
00000120: 38 38 34 2D 34 31 34 2D 38 2D 39 34 38 31 36 36 884-414-8-948166
00000130: 33 36 36 30 36 38 35 38 38 2D 31 31 31 36 33 31 366068588-111631
00000140: 35 33 37 2D 31 39 31 31 33 31 33 31 33 31 33 31 537-191131313131
00000150: 39 34 34 2D 34 2D 39 39 32 2D 33 31 33 38 39 2D 944-4-992-31389-
00000160: 32 2D 32 32 35 2D 39 31 39 31 35 31 31 34 36 39 2-225-9191511469
00000170: 33 32 35 33 32 2D 39 39 39 38 31 32 39 35 35 2D 32532-999812955-
00000180: 35 2D 35 2D 39 39 32 36 32 36 37 2D 32 31 30 31 5-5-9926267-2101
00000190: 30 38 37 36 33 2D 32 2D 37 31 32 2D 32 2D 33 35 08763-2-712-2-35
000001A0: 39 32 36 37 37 2D 31 34 36 2D 30 38 34 38 33 35 92677-146-084835
000001B0: 39 31 33 2D 33 2D 31 32 32 35 31 38 38 38 38 2D 913-3-122518888-
000001C0: 31 36 39 2D 39 39 34 2D 38 31 34 2D 31 38 35 31 169-994-814-1851
000001D0: 35 31 35 31 35 31 39 31 31 38 36 33 32 31 30 33 5151519118632103
000001E0: 36 2D 38 2D 34 32 31 38 33 38 33 38 33 39 36 31 6-8-421838383961
000001F0: 38 2D 31 39 34 31 34 31 34 31 34 31 32 38 31 2D 8-1941414141281-
00000200: 37 31 32 31 32 32 39 39 39 32 32 36 30 38 38 2D 712122999226088-
00000210: 31 30 36 2D 32 2D 31 32 33 33 32 36 35 36 39 39 106-2-1233265699
00000220: 39 35 39 35 32 38 30 31 30 34 35 2D 30 38 31 39 95952801045-0819
00000230: 34 31 31 36 33 31 35 39 31 34 36 39 30 31 39 34 4116315914690194
00000240: 31 33 30 2D 33 31 32 2D 37 2D 37 31 30 36 30 38 130-312-7-710608
00000250: 31 36 30 38 33 38 33 35 39 32 31 32 33 36 35 2D 160838359212365-
00000260: 33 38 30 38 39 31 39 31 31 2D 33 33 33 2D 31 39 380891911-333-19
00000270: 30 34 33 38 33 31 34 31 34 31 34 31 34 2D 34 2D 0438314141414-4-
00000280: 34 2D 34 38 35 2D 35 2D 31 31 33 2D 35 38 35 39 4-485-5-113-5859
00000290: 35 39 30 31 36 30 37 36 36 31 36 35 36 36 39 35 5901607661656695
000002A0: 39 31 39 31 36 38 32 2D 31 36 37 31 39 33 37 2D 9191682-1671937-
000002B0: 32 36 31 32 39 39 39 38 38 38 33 2D 37 36 35 38 26129998883-7658
000002C0: 35 36 33 33 37 34 33 33 37 37 39 38 38 33 39 32 5633743377988392
000002D0: 33 33 32 39 35 35 33 31 34 30 37 36 30 31 33 33 3329553140760133
000002E0: 34 37 31 34 38 34 36 31 38 34 31 32 33 31 36 31 4714846184123161
000002F0: 32 39 37 2D 37 2D 37 38 38 31 38 34 38 2D 38 2D 297-7-7881848-8-
00000300: 38 2D 38 38 38 38 39 33 B0 00 00 00 86 00 00 00 8-888893
0xB0 * 2 + 0x108 = 0x268 => "1-"
0xB0 + 8 = 0xB8 => 0x41 "A"
0x86 * 2 + 0x108 = 0x214 => "2-"
一 0xa440
乙 0xa441
不 0xa4a3
大 0xa46a
夫 0xa4d2
雨 0xab42
==
ici deartab.ici
行列輸入法的方法本身和對照表是免費授權的
行 0xA6E6 446 e1 b0 b0 46 98(.) 1-(A) 1-(A) 3-(D)
列 0xA643 317 b0 c7 dd 0 1-(A) 76(M) 33(E) ( )
輸 0xBFE9 4374 4f 12 7c dd 14(Q) 81(I) 71(U) 33(E)
入 0xA44A 10 fc 0 0 0 8-(K) ( ) ( ) ( )
法 0xAA6B 985 9 b7 40 0 38(C) 41(R) 26(X) ( )
的 0xAABA 1030 5d 8f 3a 50 9-(L) 01(P) 95(L) 6-(H)
方 0xA4E8 134 c9 0 0 0 65(H) ( ) ( ) ( )
法 0xAA6B 985 9 b7 40 0 38(C) 41(R) 26(X) ( )
本 0xA5BB 246 bd b0 0 0 48(V) 1-(A) ( ) ( )
身 0xA8AD 703 8b 0 0 0 99(.) ( ) ( ) ( )
和 0xA94D 798 5d bd 9d 0 9-(L) 48(V) 0-(;) ( )
對 0xB9EF 3438 a6 b0 60 50 38(C) 1-(A) 81(I) 6-(H)
照 0xB7D3 3096 8f d3 9d c 01(P) 7-(J) 0-(;) 88(,)
表 0xAAED 1081 e 5d 7a 0 41(R) 9-(L) 28(X) ( )
是 0xAC4F 1271 8f b0 2a 0 01(P) 1-(A) 38(C) ( )
免 0xA74B 482 41 9d 49 0 7-(J) 0-(;) 2-(S) ( )
費 0xB64F 2841 64 3b eb f7 51(T) 5-(G) 33(E) 78(M)
授 0xB1C2 2137 24 27 4e c2 94(O) 99(.) 7-(J) 58(B)
權 0xC576 5235 bd 5f 9d f3 48(V) 4-(F) 0-(;) 61(Y)
的 0xAABA 1030 5d 8f 3a 50 9-(L) 01(P) 95(L) 6-(H)
Input next line:
ici deartab.ici
不大夫雨
不 0xA4A3 65 5c 0 0 0 16(Z) ( ) ( ) ( )
大 0xA46A 42 62 0 0 0 18(Z) ( ) ( ) ( )
夫 0xA4D2 112 68 0 0 0 18(Z) ( ) ( ) ( )
雨 0xAB42 1101 6f 0 0 0 18(Z) ( ) ( ) ( )
Input next line:
ici deartab.ici
套介廚蹤
套 0xAE4D 1583 62 1a 0 0 18(Z) 16(Z) ( ) ( )
介 0xA4B6 84 fb eb 0 0 8-(K) 33(E) ( ) ( )
廚 0xBC70 3816 33 b8 9d 50 69(N) 41(R) 0-(;) 6-(H)
蹤 0xC2DC 4832 28 e1 fb 2a 2-(S) 98(.) 8-(K) 38(C)
Input next line:
// deartab.ici
// http://ici.sourceforge.net
// http://en.wikipedia.org/wiki/Big5
// 0xa440 to 0xc67e Frequently used characters 常用字
// 0xc940 to 0xf9d5 Less frequently used characters 次常用字
// First byte ("lead byte") 0x81 to 0xfe
// Second byte 0x40 to 0x7e, 0xa1 to 0xfe
// 157 words?
// 0xB0 * 2 + 0x108 = 0x268 => "1-"
// 0xB0 + 8 = 0xB8 => 0x41 "A"
extern all = getfile(fopen("ar.tab", "r"));
extern kk(i) {
printf(" %s%s(%s) ", all[i*2+0x108], all[i*2+0x109], all[i+8]);
}
while(s=getline(stdin)) {
s2 = s;
while(1) {
t = s2 ~~~ #[ \t\n]*(.)(.)(.*)#;
if (t) {
printf("%s%s 0x%X%X ", t[0], t[1], toint(t[0]), toint(t[1]));
a = toint(t[0]);
b = toint(t[1]);
if (b >= 0x40 && b <= 0x7e) {
b2 = b - 0x40;
} else if (b >= 0xa1 && b <= 0xfe) {
b2 = b - 0xa1 + 0x7e - 0x40 + 1;
} else {
printf("error b %s %x \n", t[1], b);
}
if (a >= 0xa4 && a <= 0xc6) {
a2 = a - 0xa4;
} else if (a >= 0xc9 && a <= 0xf9) {
a2 = a - 0xc9 + 0xc6 - 0xa4 + 1;
} else {
printf("error a %s %x \n", t[1], b);
}
sum = a2 * 157 + b2;
printf(" %-06d ", sum);
p = sum * 4 + 0x308;
p1 = toint(all[p]);
p2 = toint(all[p+1]);
p3 = toint(all[p+2]);
p4 = toint(all[p+3]);
printf(" %-3x %-3x %-3x %-3x ", p1, p2, p3, p4);
kk(p1); kk(p2); kk(p3); kk(p4);
printf("\n");
if (t[2])
t2 = t[2];
else
t2 = 0;
}
if (t2) {
s2 = t2 ~~ #([^ \n\t]+)#;
if (!s2)
break;
// printf("s2 is %s\n", s2); // debug
} else
break;
}
printf("Input next line:\n");
}
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.113.22.98
Array 近期熱門文章
PTT數位生活區 即時熱門文章