F freeisland Unregistered / Unconfirmed GUEST, unregistred user! 2005-12-03 #1 汉字中"永"在ASCM 中的值为-11328 ,请问我现在想把“汉字”转为ascm要如何写???
F freeisland Unregistered / Unconfirmed GUEST, unregistred user! 2005-12-03 #2 汉字中"永"在ASCM 中的值为-11328 ,请问我现在想把“汉字”转为ascm要如何写???
中 中鼎 Unregistered / Unconfirmed GUEST, unregistred user! 2005-12-03 #4 procedure TForm1.Button1Click(Sender: TObject); var i: Smallint; begin i:= (Ord('永'[1]) shl 8)+Ord('永'[2]); edit2.text:=inttostr(i); end;
procedure TForm1.Button1Click(Sender: TObject); var i: Smallint; begin i:= (Ord('永'[1]) shl 8)+Ord('永'[2]); edit2.text:=inttostr(i); end;
X xianguo Unregistered / Unconfirmed GUEST, unregistred user! 2005-12-03 #5 Function Chinese2MacCode(AiChinese : String) : Integer; Var ch, cl : Integer; Begin ch := Ord(AiChinese[1]); cl := Ord(AiChinese[2]); Result := (ch shl 8) + cl; end; procedure TForm1.Button2Click(Sender: TObject); begin Edit1.Text := IntToStr(Chinese2MacCode('永')-65536); end;
Function Chinese2MacCode(AiChinese : String) : Integer; Var ch, cl : Integer; Begin ch := Ord(AiChinese[1]); cl := Ord(AiChinese[2]); Result := (ch shl 8) + cl; end; procedure TForm1.Button2Click(Sender: TObject); begin Edit1.Text := IntToStr(Chinese2MacCode('永')-65536); end;
J jlyin Unregistered / Unconfirmed GUEST, unregistred user! 2005-12-03 #6 汉字转UNICODE http://www.delphibbs.com/keylife/iblog_show.asp?xid=16632