Outlook not processing multi-byte characters when using mailto:

后端 未结 5 575
谎友^
谎友^ 2021-01-15 21:59

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

5条回答
  •  太阳男子
    2021-01-15 22:10

    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:

     
    

    You can switch to Outlook 2007 and/or open the mail in editor and adjust the message properties:

    • open the message
    • Edit -> Edit message
    • Format -> Encoding -> select new encoding
    • File -> Save

    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.

提交回复
热议问题