I am in a situation where i have to replace some Windows-1252 special characters. More characters may be added later - so i want a general method instead of this hardcoding.
private string URLEncode(string s)
{
s = s.Replace("ø", "%f8");
s = s.Replace("Ø", "%f8");
s = s.Replace("æ", "%e6");
s = s.Replace("Æ", "%e6");
s = s.Replace("å", "%e5");
s = s.Replace("Å", "%e5");
return s;
}
Is this possible? I don't know what this '%f8' format is, but it works.