2

I am using the following code:

CAtlNavigateData navData;
CStringA m_strForm = "name=+++&priv=1&password=";
navData.SetPostData((BYTE*)(LPSTR)(LPCSTR)m_strForm, m_strForm.GetLength(), QHTTP_FORM_URLENCODE);

special symbols such as :"+++" need to do url-encoding, without url-encoding, +++ will turned into space.

I need a converer.

CString URLEncodingConvertion(const CString& original)
{
XXX
}

Is there any APIs for doing this in c++? If I implement it myself, maybe I can not take whole situations into account. And can not control the code.

Can anyone help?

Many thanks!

user25749
  • 4,825
  • 14
  • 61
  • 83

1 Answers1

4

AtlEscapeUrl()

Georg Fritzsche
  • 97,545
  • 26
  • 194
  • 236