Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chinese characters in mailto subject line of email

I'm looking to add some Chinese characters in a mailto: email link.

I've tried

<a href="mailto:[email protected]?subject=调查 / Inquiry">Email</a>

but when I click on the link the Outlook subject line shows:

调查亨德森 / Inquiry

I've also tried

<a href="mailto:[email protected]?subject=&#35843;&#26597; / Inquiry">Email</a>

but I get the same result as above.

I realize this may be an Outlook issue but I'm interested in finding out the correct way to implement this functionality.

like image 327
Flyer1 Avatar asked Oct 24 '25 06:10

Flyer1


1 Answers

Raw URL Encode

To encode mailto links / standard links with special characters you can use the php function rawurlencode

If you are looking for an online tool try http://www.cafewebmaster.com/online_tools/rawurlencode

Using your example:

<a href="mailto:[email protected]?subject=调查 / Inquiry">Email</a>

would convert to:

<a href="mailto:[email protected]?subject=%E8%B0%83%E6%9F%A5 / Inquiry">Email</a>

like image 169
Sam Avatar answered Oct 25 '25 21:10

Sam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!