They can be considered as special characters that contains specific symbols or accents attached to them. For ex: ÁÇËÌÖ
To convert those special characters in C#, you can use the following function.
//this function will accept codepage in integer and accented characters in string public string ConvertAccentedString(int codepage, string accentedString) { return System.Text.Encoding.ASCII.GetString( System.Text.Encoding.GetEncoding( codepage ).GetBytes( accentedString )); }
The codepage represents the unicode of specific language. See below example list of codepage:
How to use the function?
Please see the following example:
protected void Page_Load(object sender, EventArgs e) { string accentedString = "ÁÇËÌÖ"; Response.Write("After conversion to string: " + ConvertAccentedString(1251, accentedString)); }
The above demo will print the following result: ACEIO