如何将delphi中的ASCII码转换为GBK

解决方案 »

  1.   

    不需转换,瘟系统默认就是GBK编码。
      

  2.   

    如何将短信接收的信息unicode转换为gbk?
      

  3.   

    请问,我用delphi开发联通通信网关,接收中文短信时UCS2编码怎么转换为汉字编码。谢谢
      

  4.   


    var i: integer;
        s1, s2: string;
    begin
     s1 := label1.Caption;
      for I:= 1 to Length(s1) div 2 do
      begin
         s2 := s2 + Chr(StrToInt('$' + s1[i*2-1]+s1[i*2]));
      end;
      label2.Caption := s2;
    end;
      

  5.   

    procedure TForm1.Button1Click(Sender: TObject);
    var
      s:string;
    begin
      s:='好好';
      edit1.Text:=inttohex(ord(s[1]),2)+inttohex(ord(s[2]),2)+inttohex(ord(s[3]),2)+inttohex(ord(s[4]),2);