自動產生所有的Big5 與 中文字的對照檔,格式-->(Name=Value) |
|
ddy
站務副站長 發表:262 回覆:2105 積分:1169 註冊:2002-07-13 發送簡訊給我 |
規則:
(1) BIG-5 double bytes coding First byte: 0xA1 - 0xF9
symbols: 0xA1 - 0xA3 ( 3 sectors)
common hanzi: 0xA4 - 0xC6 (35 sectors)
undefined: 0xC7 - 0xC8 ( 2 sectors)
rare hanzi: 0xC9 - 0xF9 (49 sectors)
total defined: 3+35+2 (87 sectors)
Second byte: 0x40 - 0xFE
part one: 0x40 - 0x7E (63 codes)
undefined: 0x7F - 0xA0 (34 codes)
part two: 0xA1 - 0xFE (94 codes)
total defined: 63+94 (157 codes)
coding space: 87 x 157 = 13659 codes (2) BIG-5 three sections
------------------------
symbols:
full: 3x157=471 codes
undefined: 0xA3C0 - 0xFE (47 codes)
total defined: 471-47 (424 codes)
common hanzi:
full: 35x157=5495 codes
undefined: 0xC6A1 - 0xC6FE (94 codes)
total defined: 5495-94 (5401 codes)
rare hanzi:
full: 49x157=7693 codes
undefined: 0xD6 - 0xFE (41 codes)
total defined: 7693-41 (7652 codes)
defined char:
pure hanzi: 5401+7652=13053
all: 424+13053=13477 ==========================================================
procedure TForm1.Button2Click(Sender: TObject); var sec, off:integer; begin for sec:=$A1 to $F9 do begin for off:=$40 to $7E do begin memo1.Lines.Add(inttohex(sec,2)+inttohex(off,2)+'='+ char(sec)+char(off)); end; //0x7F - 0xA0 未定義 for off:=$A1 to $FE do begin memo1.Lines.Add(inttohex(sec,2)+inttohex(off,2)+'='+ char(sec)+char(off)); end; end; memo1.Lines.SaveToFile(GetCurrentDir +'\Big5Code.txt'); end;====此段程式碼和上面相同,供剪貼用======= procedure TForm1.Button2Click(Sender: TObject); var sec, off:integer; begin for sec:=$A1 to $F9 do begin for off:=$40 to $7E do begin memo1.Lines.Add(inttohex(sec,2)+inttohex(off,2)+'='+ char(sec)+char(off)); end; //0x7F - 0xA0 未定義 for off:=$A1 to $FE do begin memo1.Lines.Add(inttohex(sec,2)+inttohex(off,2)+'='+ char(sec)+char(off)); end; end; memo1.Lines.SaveToFile(GetCurrentDir +'\Big5Code.txt'); end; |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |