A kind reader of one of my blogs posed me a question about a problem with HttpUtility.UrlEncode. His problem was that he needed to URL encode São Marcos and instead of getting S%E3o%20Marcos he was getting S%C3%A3o%20Marcos.
The problem here is the character encoding. The default encoding used by HttpUtility.UrlEncode (and HttpUtility.UrlDecode) is utf-8 and the requested site is expecting iso-8859-1.
To solve this problem, all that is needed calling HttpUtility.UrlEncode with the required character encoding:
System.Web.HttpUtility.UrlEncode("São Marcos", System.Text.Encoding.GetEncoding("iso-8859-1"))