URL Encoder
-
Hi, Please can someone tell me, where do I get the URL Encoder for C++.:( Many Thanks, John
-
Hi, Please can someone tell me, where do I get the URL Encoder for C++.:( Many Thanks, John
Err... what the hell is an "URL Encoder"? Could you give an example what it should do? :confused: -Dominik
-
Err... what the hell is an "URL Encoder"? Could you give an example what it should do? :confused: -Dominik
Hi Dominik, Apparently I want to encode a string in C++ and then store the same in a char field. Thanks, John
-
Hi Dominik, Apparently I want to encode a string in C++ and then store the same in a char field. Thanks, John
What does "encode" mean in this context?
-
What does "encode" mean in this context?
Encode would imply parsing a string with values. ex. if the string was www.yahoo.com before encryption, after encryption it would be something like www&&yahoo^com. the characters would be replaced.
-
Encode would imply parsing a string with values. ex. if the string was www.yahoo.com before encryption, after encryption it would be something like www&&yahoo^com. the characters would be replaced.
So you need a function which does the same as the function escape("") in JavaScript? I don't know any existing source which does this. But it should not be that hard to replace some characters with some other, especially if you use CString or STL strings.
-
So you need a function which does the same as the function escape("") in JavaScript? I don't know any existing source which does this. But it should not be that hard to replace some characters with some other, especially if you use CString or STL strings.
Yes, I need something like escape in java!!! Please can you help me out with it, I am pretty newbie in C++. Thanks Dominik, John
-
Yes, I need something like escape in java!!! Please can you help me out with it, I am pretty newbie in C++. Thanks Dominik, John
The easiest way is using CStrings. Create a CString object and copy the string you want to encode in the CString.
CString str;
str = "www.yahoo.com";Now, replace all the characters you want to encode.
str.Replace(" ", "%20");
This would encode all spaces to the correct %20 code. Now you would have to do this for all characters... For all codes see the following sites: http://www.macromedia.com/support/flash/ts/documents/url_encoding.htm[^] http://www.blooberry.com/indexdot/html/topics/urlencoding.htm[^] http://ops.tamu.edu/nipsy/url/common_encodings.html[^] :-D -Dominik
-
The easiest way is using CStrings. Create a CString object and copy the string you want to encode in the CString.
CString str;
str = "www.yahoo.com";Now, replace all the characters you want to encode.
str.Replace(" ", "%20");
This would encode all spaces to the correct %20 code. Now you would have to do this for all characters... For all codes see the following sites: http://www.macromedia.com/support/flash/ts/documents/url_encoding.htm[^] http://www.blooberry.com/indexdot/html/topics/urlencoding.htm[^] http://ops.tamu.edu/nipsy/url/common_encodings.html[^] :-D -Dominik
Just as an aside through boredom theres also encoding of IP addresses. Its pretty stupid but quirky in a bored sort of way. Its basically turning each decimal octet into a hex string or octal string. You can find out about that here - http://www.pc-help.org/obscure.htm#hexip boredom is a bad thing on a board like this :)
-
Hi, Please can someone tell me, where do I get the URL Encoder for C++.:( Many Thanks, John
Use the InternetCanonicalizeUrl() function ;) - Anders Money talks, but all mine ever says is "Goodbye!"