Solved

URLEncoder.encode() needed for C++

Posted on 2001-08-27
2
266 Views
Last Modified: 2007-12-19
Hi I am implementing a HTTP client in C++ and I need this function to "URL-encode" a given string. I know it's a standard function in Java, as well as in .NET platform.

Is there a (Visual) C++ implementation out there?
0
Comment
Question by:geekone
  • 2
2 Comments
 
LVL 86

Expert Comment

by:jkr
ID: 6430229
'InternetCanonicalizeUrl()' should do what you want.
0
 
LVL 86

Accepted Solution

by:
jkr earned 100 total points
ID: 6430233
Ooops, forgot the link http://msdn.microsoft.com/library/default.asp?url=/workshop/networking/wininet/reference/functions/internetcanonicalizeurl.asp 

See also http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceinet/htm/wininet_6.asp - quote:

The InternetCanonicalizeUrl function can be used to canonicalize URLs. InternetCanonicalizeUrl does not verify that the URL passed to it is canonicalized or that the URL it returns is valid.

The URL functions operate in a task-oriented manner. The content and format of the URL passed to the function is not verified. The calling application should track the use of these functions to ensure the data is in the intended format. For example, the InternetCanonicalizeUrl function would convert the character % into the escape sequence ?%25? when using no flags
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question