Some old database still store data in ascii characters. However, today's website is all unicode or utf enabled. That means it's able to support more characters (such as Japanese, French, Chinese and etc).
using System.Text;
private string ConvertUnicodeToAnsi(string input)
{
if (input.Length == 0) return string.Empty;
var ascii = new ASCIIEncoding();
return ascii.GetString(ascii.GetBytes(input));
}
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment