UrlDecode
From CometWiki
Changes characters which were encoded by the browser to their ascii equivalents...
void URLdecode(CString &Value)
{
Value.Replace(_T("""),_T("\""));
Value.Replace(_T("<" ),_T("<"));
Value.Replace(_T(">" ),_T(">"));
Value.Replace(_T("&" ),_T("&"));
Value.Replace(_T(" "),_T(" "));
Value.Replace(_T("+"),_T(" "));
CString a;
CString b;
for (int i=0;i<=255;i++)
{
char x = i;
CString b = x;
a.Format("&#%d;",i);
Value.Replace(a,b);
a.Format("%%%02X",i);
Value.Replace(a,b);
a.Format("%%%02x",i);
Value.Replace(a,b);
}
}