Solved

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

Posted on 2006-11-26
3
424 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
[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
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

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

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 53
format the code in java 6 110
sum28 challenge 31 117
fizzArray  challenge 1 109
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.

696 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