delphi 简体和繁体字符串转换

function GB2Big(GB: string): string; //简体转换成繁体
var
Len: Integer;
begin
Len := Length(GB);
SetLength(Result, Len);
LCMapString(GetUserDefaultLCID, LCMAP_TRADITIONAL_CHINESE, PChar(GB), Len, PChar(Result), Len);
end;

function Big2GB(Big: string): string; //繁体转换成简体
var
Len: Integer;
begin
Len := Length(Big);
SetLength(Result, Len);
LCMapString(GetUserDefaultLCID, LCMAP_SIMPLIFIED_CHINESE, PChar(Big), Len, PChar(Result), Len);
end;

posted @ 2017-08-09 09:15  夏天的西瓜君  阅读(426)  评论(0编辑  收藏  举报