Solved

mailto and french accents

Posted on 2004-03-22
4
2,274 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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

786 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