生成GBK码表

2008-04-09 04:24:32来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折

program GenGBKCode;
{$APPTYPE CONSOLE}
uses
  SysUtils;
Var
  i, j: byte;
  mFile: textfile;
begin
  AssignFile(mFile, ''''GBKCode.txt'''');
  Rewrite(mFile);
{
GBK字符集范围
分区                      高位     低位
----------------------------------------------
●GBK/1:GB2312非汉字符号: A1~A9 || A1~FE
●GBK/2:GB2312汉字      : B0~F7 || A1~FE
●GBK/3:扩充汉字        : 81~A0 || 40~FE
●GBK/4:扩充汉字        : AA~FE || 40~A0
●GBK/5:扩充非汉字      : 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.

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:Delphi 与 XML 示例(直接利用IXMLDocument)

下一篇:改变Windows的缺省打印机