Problem Source: http://www.cnblogs.com/del/archive/2008/11/22/1284923.html#1378410
Delphi 2009 uses multi-byte encoding (MBCS) by default. Delphi indicates tencoding. default.
The following is an example of conversion between multi-byte encoding and Chinese characters:
Unit unit1; interfaceuses windows, messages, sysutils, variants, classes, graphics, controls, forms, dialogs, stdctrls; Type tform1 = Class (tform) button1: tbutton; button2: tbutton; button3: tbutton; Procedure button1click (Sender: tobject); Procedure button2click (Sender: tobject); Procedure button3click (Sender: tobject); end; var form1: tform1; implementation {$ R *. DFM} {Chinese character to multi-byte encoding} procedure tform1.button1click (Sender: tobject); var stream: tstringstream; B: byte; s: string; begin stream: = tstringstream. create ('ours ', tencoding. default); s: = ''; for B in stream. bytes do s: = format ('% S % x', [S, B]); showmessage (s); {ce D2 C3 C7} stream. free; end; {multi-byte encoding to Chinese characters} procedure tform1.button2click (Sender: tobject); var stream: tstringstream; begin stream: = tstringstream. create; stream. size: = 4; stream. bytes [0]: = $ CE; stream. bytes [1]: = $ D2; stream. bytes [2]: = $ C3; stream. bytes [3]: = $ C7; showmessage (stream. datastring); {We} stream. free; end; {convert multi-byte encoded strings to Chinese characters} procedure tform1.button3click (Sender: tobject); var STR: ansistring; stream: tstringstream; I: integer; begin STR: = 'ced2c3c7'; stream: = tstringstream. create; stream. size: = length (STR) Div 2; for I: = 1 to length (STR) do if odd (I) Then stream. bytes [I Div 2]: = strtointdef (Concat (#36, STR [I], STR [I + 1]), 0); showmessage (stream. datastring); {We} stream. free; end.