program GenGBKCode; {$ APPTYPE CONSOLE} uses SysUtils; Var i, j:
Byte
; MFile: textfile; begin AssignFile (mFile,
'
GBKCODE.TXT
'
); Rewrite (mFile); {GBK character set range partitioning High Low
----------------------------------------------
● GBK
/
1
: GB2312 non-kanji symbols: A1
~
A9
||
A1
~
FE ● GBK
/
2
: GB2312 Chinese characters: B0
~
F7
||
A1
~
FE ● GBK
/
3
: Extended Character:
81
~
A0
||
40
~
FE ● GBK
/
4
: Extended Character: AA
~
FE
||
40
~
A0 ● GBK
/
5
: Expansion of non-Chinese characters: A8
~
A9
||
40
~
A0}
for
i:
=
$ A1 to $ A9
DO
for
j:
=
$ A1 to $ FE
DO
Write (mFile, chr (i), chr (j));
for
i:
=
$ B0 to $ F7
DO
for
j:
=
$ A1 to $ FE
DO
Write (mFile, chr (i), chr (j));
for
i:
=
$
81
to $ A0
DO
for
J:
=
$
40
to $ FE
DO
Write (mFile, chr (i), chr (j));
for
i:
=
$ AA to $ FE
DO
for
j:
=
$
40
to $ A0
DO
Write (Mfile, CHR (I), CHR (j));
for
i:
=
$ A8 to $ A9
DO
for
j:
=
$
40
To $ A0
DO
Write (mFile, chr (i), chr (j)); Close (mFile); end.