Solved

mailto and french accents

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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
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…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

863 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

22 Experts available now in Live!

Get 1:1 Help Now