I have a very nice function which encodes ASCII to russian charachters, however I need it also the other way around from russian to ASCII.
The function I have is:
public string DecodeEncodedNonAsciiCharacters(string value)
{
return Regex.Replace(
value,
@"\\u(?<Value>[a-zA-Z0-9]{4})",
m =>
{
return ((char)int.Parse(m.Groups["Value"].Value, NumberStyles.HexNumber)).ToString();
});
}
I cant find a good way to get \u235 in my text or any other way to escape these type of characters