Solved

URI decoding using C++ (plz help !!!!!!!!!!)

Posted on 2006-11-26
3
404 Views
Last Modified: 2013-11-20
Hi,
My current MFC/C++ project needs to convert an encoded URI by Internet Explorer to the decoded original text.
The problem is that some chars like ä, ö, ü, á, ó... which are language specific (german, ...)
are differtly encoded (? UTF-8)
I am looking for a function which does this jobs, and considers these special characters.

All functions I have found till date only consider alpha - numerical chars and few others.
I would also consider using Winsock, if I knew the related function name.

Any help will be very much appreciated.

Thanks, Sina Falahati
0
Comment
Question by:falahati_sina
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 250 total points
Comment Utility
'InternetCanonicalizeUrl()' (http://msdn2.microsoft.com/en-us/library/aa384342.aspx) does that job.
0
 
LVL 22

Assisted Solution

by:mahesh1402
mahesh1402 earned 250 total points
Comment Utility
May be following article with src will be helpful for your purpose too :
URI Encoding and Decoding : http://www.codeguru.com/cpp/i-n/internet/http/article.php/c12759/

-MAHESH
0
 

Author Comment

by:falahati_sina
Comment Utility
Thanks, seems that both functions do not support UTF-8, and that some browsers (old browsers) don't do this either :)  There is a nice implementation for converting to UTF-8 for javascript on the net with support for old browsers.
I used the approach of calling a Javascript function from my C++ programme using HTMLView and getting the results.

Since both functions work for usual encoding, I split the points among you...

Cheers, Sina
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

763 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

11 Experts available now in Live!

Get 1:1 Help Now