I 've done a newsletter for others these days. Outlook displays garbled characters while processing mailto:?subject= Chinese.
This problem first appeared once when I was doing the Web page. At that time on the Internet to find a bit, also did not in-depth analysis, on the page header part of the CharSet set my gb2312, link part did not modify, or native Chinese:
<a href= "mailto:xxx@hotmail.com?subject= Welcome to the exposition" > I want to attend </a>
Click Test: I want to attend
The Web page in IE click to open Outlook when the Chinese is OK, but Firefox is not. Consider that the customer basically will not use Firefox, lazy without analysis. The result is that it must happen.
After the bulk mail system, the mail system for all links to the page to do the packaging, became:
<a href= "HTTP://XXX.XXX.COM/QWERFASDGQWERDAFSD ..." > I want to attend </a>
After the click will open an IE window, and then redirect to Outlook, the display theme is garbled.
Baffled, and finally help the mail service provider's customer service, the solution is simple:
Copy the Chinese theme to the Baidu search box search, and then the URL in the wd= behind the%bb%b6%d3 ... Copy replacement is OK.
Baidu GBK the Chinese part when sending URLs to the server.
Here is a reprint of the browser processing URL information
The composition of the URL:
Domain Name: Port/contextpath/servletpath/pathinfo?querystring
Browser Display Web page:
The browser is based on the contenttype in the HTTP header ("text/html; CHARSET=GBK "), specifies the character set to decode the byte stream that the server sends over.
Browser URL encoding :
If the URL contains non-ASCII characters such as Chinese, the browser urlencode them. In order to avoid the browser using the code we do not want, it is best not to use non-ASCII characters directly in the URL, but to use the URL encode encoded string%.
1, Get method submission, the browser URL encode URL, and then sent to the server.
(1) For Chinese ie, if the choice of advanced options is always sent in UTF-8 (the default), then PathInfo is the URL encode is encoded according to UTF-8, QueryString code according to GBK.
http://localhost:8080/example/China? Name= China
The actual submission is:
Get/example/%e4%b8%ad%e5%9b%bd?name=%d6%d0%b9%fa
(1) For Chinese IE, if the cancellation is always sent in UTF-8 in Advanced options, then PathInfo and querystring are URL encode encoded according to GBK.
The actual submission is:
Get/example/%d6%d0%b9%fa?name=%d6%d0%b9%fa
(3) For Chinese Firefox, both PathInfo and QueryString are URL encode encoded according to GBK.
The actual submission is:
Get/example/%d6%d0%b9%fa?name=%d6%d0%b9%fa
Obviously, different browsers and different settings for the same browser affect the PathInfo encoding in the final URL. For the Chinese IE and Firefox are using GBK coding querystring.
Click Test: I want to attend
CSDN has a good article detailing the URL encoding:
Http://blog.csdn.net/yzhz/archive/2007/07/03/1676796.aspx