Solved

mailto and french accents

Posted on 2004-03-22
4
2,268 Views
Last Modified: 2012-08-14
I am having trouble with the mailto: function. If I use french accents whent the email actually comes up, there are strange characters in place of the accents. Should I be using other characters to represent the accents? If so what are they?

            Dim subject As String = "é à è ê ç É À È Ê, etc."
            Dim body As String = "é à è ê ç É À È Ê, etc."
            lnkEmail.NavigateUrl = "mailto:?Subject=" & subject & "&Body=" & body

Thanks,
0
Comment
Question by:Gezna
  • 2
4 Comments
 
LVL 22

Expert Comment

by:_TAD_
ID: 10649915


Do the email addresses have accents in them?

Like this:
aàbbcc@Home.Com

If the deliverable email addresses are suppose to have accents, then I think you need to change use the globalization namespace and change your country code from en-US to something that will understand the french letters.

You other alternative is to change the text from ASCII to UTF-8 or unicode.

What it reall boils down to is that the first 128 characters are control characters or English based characters and punctuation.  The extended characters depends on which text format or country code you use.  
0
 
LVL 4

Accepted Solution

by:
chinhdo1 earned 500 total points
ID: 10649934
Try changing your codepage to 1252.

From the HTML view, hit F4 to bring up the Properties window, select DOCUMENT in the dropdown list, then change codePage to 1252.
0
 

Author Comment

by:Gezna
ID: 10651182
This worked great! Can you explain what the codepage attribute is for me please? Are there others, or any other problems this attribute may solve/cause?
0
 
LVL 4

Expert Comment

by:chinhdo1
ID: 10651952
Gezna, I am not sure if I can explain precisely why setting charset/codepage fixes the problem but I'll try with what I know.

By default, ASP.NET uses UTF-8 as the charset (16-bit characters). When you click on a "mailto" hyperlink, the email data on the page is picked up by the browser and passed to the default email application. So, either IE or Outlook (this combo is what I have on my PC) is not set up to deal with Unicode characters from a mailto hyperlink. I am not surprised at this behaviour... many Windows apps either do not support Unicode or support it only partially. For example, in Outlook, you can type Unicode characters in the message body but not in the Subject line.

When you specify a codepage such as 1252 (Western European), I think the characters are encoded as 8-bit characters and therefore are dealt with properly.

The only problem I can think of with using non-UTF charset is that you won't be able to display the entire UTF range of characters (chinese, japanese, hebrew, etc.) on your page. It should not be a problem at all for Frech characters, which are found within the 256 characters of the 1252 codepage.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

762 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

21 Experts available now in Live!

Get 1:1 Help Now