[@more@]
///
/// 檢查strInput中是否有Unicode字符
///
/// 要檢查的字符串
/// true:有Unicode字符; false:沒有Unicode字符
public static bool CheckExistUnicode(string strInput)
{
int i = strInput.Length;
if (i == 0)
return false;
int j = System.Text.Encoding.Default.GetBytes(strInput).Length;
if (i != j)
return true;
else
return false;
}
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/9437124/viewspace-1001737/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/9437124/viewspace-1001737/