Reputation: 780
I am using a simple mailto option in my html so that whenever the user clicks on the mailto, it creates a pre defined email with subject and body. The issue is that, the functionality works fine but there is a special character  before the currency symbol and i am clueless what might be the reason.
Also, Weirdly this happens only when i use chrome and not firefox.
(Never tested in IE)
Any directions on how to proceed with this?
The code is pretty simple and straight forward
<a id="body_0_contentcolumn_0_hypOutlook" href="mailto:?subject=test subject&body=Hi, how are you?%0A%0AI wanted to share a job I thought you might be interested in.Salary £15000.00- £25000.00%0A%0AYou can view more details and apply online here:www.apply.com">Outlook
</a>
Pls find the fiddle below..
i am using outlook 2013 and Chrome 33
Upvotes: 1
Views: 2118
Reputation: 1016
Per RFC 6068, a "mailto:" link is a series of ASCII characters. Non-ASCII characters in the body must be represented by UTF-8 ecoding them and then %-encoding the resulting octets. It makes sense that a browser might try to be friendly by converiting non-ASCII characters in the "mailto:" link that way, but it's also a less-common case. Report a bug against Chrome, but the quick fix may be to do the UTF-8 and %-encoding yourself.
Upvotes: 0
Reputation: 324610
It's all about encoding.
£
is character number 0xA3
. This, when encoded "properly" (ie. in UTF-8), is converted to 0xC2A3
- coincidentally, you have the same A3
in there, which means the rendered result, £, looks like it just acquired a "random"  out of nowhere.
Solution: Encode the £
properly. Try £
first, and if that doesn't work try %A3
.
Upvotes: 3