I have similar problem to the one described in this question: I am using the \"mailto\" protocol to open the default mail client from Java (I am tied to Java 5 for now, so s
The mailto: link should use RFC2047 encoding rather than UTF. http://en.wikipedia.org/wiki/MIME
mailto:me@example.com?subject==?UTF8?B?aGVsbG8?=
http://webnet77.com/cgi-bin/helpers/base-64.pl
I guess your Java mailer works OK but to be sure, try switching to JavaMail.
Have a look at this post. Outlook 2003 by default does not correctly recognize the character encoding of HTML mails (in many case) even though they contain the appropriate tag:
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
You can switch to Outlook 2007 and/or open the mail in editor and adjust the message properties:
Edit: Corrections after the question changed.
Edit2: Sorry hadn't read the full question.
I see you have the Java 5 constraint but if the implementation is also tied to Windows, consider using a JNI/JNA based solution (unfortunately I cannot give you links on that). I would also have a look at the OpenJDK's Desktop API implementation and extract the way from it.
Another option would be to somehow pass in the message without URLEncoding it?
Also if there is a requirement for the user to customize the message before sent, you could provide a simple editor for that within your application and still send the message via JavaMail.
You could also offer the cooperative way of preparing the message for the user, putting it onto the clipboard and open the e-mail client for the user. Then the user only needs to issue a CTRL+V to paste in the prepared text.
You are not specifying any encoding, so Outlook (or whoever gives the address to Outlook) can only guess. In case of your HTMl snippet, try whether specifying the encoding (UTF-8) explicitly in the <head>
changes that behavior.
As far as cmd is concerned, it can't really cope with UTF-8. It handles Unicode as UTF-16, though, albeit with problems.
When I try this here (Windows Live Mail, instead of Outlook, though), everything in the subject gets converted to the legacy codepage so having CJK there should be a problem.
However, I wonder why you are trying to mis-use cmd
to let the user write a mail anyway. There are surely better alternatives out there (even though I currently don't know one because I never needed it).
You can try this:
There is an option called : Enable UTF-8 support for mailto:protocol in Outlook @
Tools > Options > Mail Format > International Options > [x] Enable UTF-8 support for mailto:protocol
Lets hope it works for you
The subject is alright for me in Windows Live Mail but the display name of the recipient not. When evertything is UTF-8 encoded, Android works fine but Windows Live Mail shows some symbols in "To:" while the "Subject:" is correct. When I use UTF-16 for "To:", Windows Live Mail works now but Android still gets it as UTF-8...