Solved

URLEncoder.encode() needed for C++

Posted on 2001-08-27
2
264 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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

759 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

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now