Solved

mailto and french accents

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

Application Discovery Service in AWS

In the era of the cloud, customers migrating away from their existing on-premise infrastructure. This requires lots of planning, strategies, and effort to identify their existing resources and determine how best to migrate.  Datacenter migrations happen in four phases -

Question has a verified solution.

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

A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

617 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