該 unit 的原出處為:
http://www.delphikingdom.com/asp/answer ... swer=16895
microsoft 的 msdn 有關的文章
http://msdn.microsoft.com/library/defau ... /mlang.asp
http://msdn.microsoft.com/library/defau ... nguage.asp
一個 charset 及 codepage 轉換的小範例,
代碼: 選擇全部
var
cset: tagMIMECSETINFO;
cp: tagMIMECPINFO;
cl: TCMultiLanguage;
s: Array[0..49] of char;
i: integer;
begin
cl := TCMultiLanguage.Create(nil);
cl.GetCharsetInfo('gb2312', cset);
ShowMessage('uiCodePage='+IntToStr(cset.uiCodePage)+'/'+'uiInternetEncoding='+IntToStr(cset.uiInternetEncoding));
cl.GetCodePageInfo(65001, cp);
for i:= 0 to 49 do
begin
s[i] := char(cp.wszWebCharset[i]);
end;
ShowMessage(s);
cl.Free;
end;