http://delphi.ktop.com.tw/board.php?cid=30&fid=69&tid=104986
try to see if this is a copy of the watch text printed on the web.functionCn2big (cnstr:string):string; varLen:integer; beginLen:=Length (CNSTR); SetLength (Result, Len); LCMapString (GetUserDefaultLCID, Lcmap_traditional_chinese, PChar (cnstr), Len, PChar (Result), Len); End; functionBIG2CN (bigstr:string):string; varLen:integer; beginLen:=Length (BIGSTR); SetLength (Result, Len); LCMapString (GetUserDefaultLCID, Lcmap_simplified_chinese, PChar (BIGSTR), Len, PChar (Result), Len); End; procedureTform1.button1click (Sender:tobject); beginEdit2. Text:=Cn2big (EDIT1. Text); End; procedureTform1.button2click (Sender:tobject); beginEdit2. Text:=BIG2CN (EDIT1. Text); End; =================== references [email protected] article ===================Happy Spring Festival! I have a Unicode-encoded text file, most of which is in Chinese, and the other is English characters, it is necessary to transform the inside of the Chinese language into a simplified Chinese Unicode content, please ask under the Delphi XE how to do? Aftcast Station Deputy Station growth table: theResponse :1421Credits:1705Registration:2002- One- +send me an SMS3Time of Discovery: -- Geneva- - -: in: -Ip:114.32. xxx.xxx Subscribe to Hello, you must warn the code on the top of the pig is correct only in the following cases:1/The OS itself is simple, and regardless of which version of Delphi (D5 should be)
The OS itself is simplified, and no matter which version of Delphi It is, D5 should be right after that.
2/if the OS is our fan, then the above code only delphi2009 the above version will be correct. If 2009 ago, it's wrong!
If the OS is our traditional, then the above code will be correct only if the above version of Delphi2009. If 2009 ago, it was wrong! The name of the Cn2big or BIG2CN is incorrect for the purpose of the normal table expression. Should change the Cn2big to Chs2cht (the simple word of the word, it must be emphasized that ...) It is not related to the code, that is, it is in the same code to replace the word only)
Simple font to the font, it must be emphasized that he is not related to the code conversion, that is, in the same encoding on the word. BIG2CN changed to Cht2chs because, in the above mentioned1Case, and Delphi is 2009 ago, although "look" the word is right, but it actually turns to be GBK encoded, not BIG5.
Because, in the above 1 case, and Delphi is 2009 ago, although it seems that the word is right, but in fact, it is GBK coding, not BIG5.
In the case of 1, but after Delphi is 2009, then the situation is the same as the case 2! and 1, but after Delphi is 2009, then the situation and case 2 are the same!
In the case of the above 2, it is because the string after d2009 is Unicode, so lcmapstring this API will call to LCMAPSTRINGW this Unicode version, is changed into a simple "font" Unicode conversion "complex" font Unicode. The above 2 case, in fact, because the string after d2009 is Unicode, soLCMapString This API will be called to the Unicode version of Lcmapstringw, so it becomes a simple glyph Unicode to multiply glyph Unicode.
If you really want to big5, or simply turn big, it's not that simple. See also my blog:http://aftcast.pixnet.net/blog/post/22191609 in addition, In the near future, I might discuss with qcom whether it is possible to open a Unicode-intensive course, as fast as March. But please listen and advise! :)
If you really want to turn BIG5, or BIG5, it's not that simple.
Gbk,big5,unicode, it's all character encodings.
Simplified, traditional, is a different form of Chinese characters. In the same code, there are 1 simplified and traditional characters.
Delphi Simplified Traditional conversion