Hi, i try to write a test bench for the scripting binding, and found this function:
wxString URLEncode(const wxString &str) // not sure this is 100% standards compliant, but I hope so
{
wxString ret;
wxString t;
for (unsigned int i = 0; i < str.length(); ++i)
{
wxChar c = str[i];
if ( (c >= _T('A') && c <= _T('Z'))
|| (c >= _T('a') && c <= _T('z'))
|| (c >= _T('0') && c <= _T('9'))
|| (c == _T('.'))
|| (c == _T('-'))
|| (c == _T('_')) )
ret.Append(c);
else if (c == _T(' '))
ret.Append(_T('+'));
else
{
t.sprintf(_T("%%%02X"), (unsigned int) c);
ret.Append(t);
}
}
return ret;
}
What does this encoding stand for? As far as i know in URL Encoding the " " gets "%20" and not "+" like in this encoding...
greetings