Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

URLEncoder.encode() needed for C++

Posted on 2001-08-27
2
Medium Priority
?
281 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 400 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
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 technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

730 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