?
Solved

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

Posted on 2006-11-26
3
Medium Priority
?
472 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 1000 total points
ID: 18014611
'InternetCanonicalizeUrl()' (http://msdn2.microsoft.com/en-us/library/aa384342.aspx) does that job.
0
 
LVL 22

Assisted Solution

by:mahesh1402
mahesh1402 earned 1000 total points
ID: 18017754
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
ID: 18031490
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
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.
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses
Course of the Month15 days, 23 hours left to enroll

850 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