Solved

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

Posted on 2006-11-26
3
407 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
ID: 18014611
'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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 48
xyBalance chalenge 58 88
C++ BOOL WINAPI ReadFile fails on windows 10 when reading from USB cable 9 379
Macro to save highlighted rows as a separate file 5 41
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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, f…

920 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

17 Experts available now in Live!

Get 1:1 Help Now