views:

534

answers:

1

Outlook is causing some problems when being passed a mailto string with accented characters in it. Changing the codepage for my entire webpage that has this string on it solves this problem, but that causes other problems in the system, so I would not like to do that.

A string like such returns a lot of garbage characters:

"mailto:[email protected]?subject=Mon bâtiment / Départementé / Bureau n'est pas répertorié"

Meanwhile, this cuts off the character after the "D"

"mailto:[email protected]?subject=Mon bâtiment / Départementé / Bureau n'est pas répertorié"

What gives? Is there no way to make this work? I am in Canada, so some regional issues might be taking effect here?

+3  A: 

Maybe you can try this generator.

Basically, you need to use the hexadecimal value of the character in the page's encoding preceded by a percent sign. For UTF-8, your â is %C3%A2.

Marcel Gosselin
As a followup to Marcel's comment, look up "URL encoding" in your favourite search engine. mailto: is a URL protocol so should be subject to the same rules as e.g. an http: URL.
Dan Fleet
This unfortunately does the same thing. This is being reproduced on several machines. Even typing the above top link directly into firefox yields scary results in outlook. Note that my keyboard settings are set to english CANADA, so this may change the game.
4501
I see what you mean, the subject in Outlook interprets the UTF-8 characters as Latin1.
Marcel Gosselin
As Latin1? How are you sure? Very interesting..
4501
Well, they look like `Mon bâtiment / Départementé / Bureau n'est pas répertorié`. I know for sure that `é` in UTF-8 converts to 2 bytes that when read as though they are latin-1 look like `é`.
Marcel Gosselin
Let's rephrase the above to make myself clear: The character `é` when written using TUF-8 encoding is two bytes. Those two bytes, if they are read as though they are Latin1 encoded characters look like `é`.
Marcel Gosselin
Well that definitely makes sense then. Hm...
4501