Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

URL Encoding and Base 64 String

$
0
0

Hi guys,

I have a question regarding URL Encoding and Base 64 String. I have a sample HTML below that I will pass as a parameter to a REST API of my email provider.

<html><body><p>Manilaé</p><a href=\"http://www.ourwebsite.net?Param1=Manilaé&Param2=Filipinó\">Visit Us Here</a></body></html>

To preserve the special characters, I convert the entire HTML  content to Base 64 String then URL Encode the converted string before passing it as a parameter. The result I get is when I click "Visit us here" the URL is correct and the special characters are preserved. However the special character in Manilaé appears as some diamond character, so it's not perfect.

If I skip the Base 64 String conversion and URL Encode directly the entire HTML Content, Manilaé appears correctly (the e special character is preserved) but the URL's special characters go wrong this time.

The problem occurs in viewing the emails in Yahoo, Hotmail, and Outlook. In Gmail it works correctly so I guess Gmail is less strict when it comes to this.

Can anyone give me an insight into what is happening and how to correct this?

Regards,

Nathan


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>