//简体转繁体
public static string _ConvertChinTrad(string strInput)
{
EncodeRobert edControl = new EncodeRobert();
string strResult = "";
if (strInput == null)
return strResult;
if (strInput.ToString().Length >= 1)
strResult = edControl.SCTCConvert(ConvertType.Simplified, ConvertType.Traditional, strInput);
else
strResult = strInput;
return new string(strResult);
}
//繁体转简体
public static string _ConvertChinSimp(string strInput)
{
EncodeRobert edControl = new EncodeRobert();
string strResult = "";
if (strInput.Length >= 1)
strResult = edControl.SCTCConvert(ConvertType.Traditional, ConvertType.Simplified, strInput);
else
strResult = strInput;
return new string(strResult);
}
说明:要引用Encode.dll