Use Delphi2010 to do a lattice font software, the font generation part is from a Delphi2007 do the old program to buckle out. Dot matrix font Software after the completion of the generation of GB2312 font in the LED control card displayed as garbled. Know that Delphi version is higher than 2009 (inclusive), then Delphi is a Unicode version, the old program is no problem, then the problem is definitely in the code to the character section, and then found
s:string;
S: = Chr (Q) + CHR (W); Q and W are high-byte and low-byte GB2312 area codes, respectively
The GB2312 Code table found the "Ah" area code for B0A1, with
ShowMessage (Chr ($B 0) + chr ($A 1););
The displayed characters are not correct.
Delphi version is higher than 2009 (inclusive), then Delphi is the Unicode version, the function CHR returns the corresponding encoded Unicode characters. For English letters, numbers and so on, and the return of the lower version of the same, for Chinese characters, it is generally returned the corresponding encoded Unicode characters.
Then instead of Ansichar ();
ShowMessage (Ansichar ($B 0) + Ansichar ($A 1));
The display character is "ah".
This solves the problem.
Delphi2010 generating GB2312 font garbled problem