Java / HTML encoding issues (dash becomes â€“)
<p><strong>The situation</strong>: I'm trying to fix some code which is using a Java backend to send automated emails using Velocity Mail Manager. </p>

<p><strong>The problem</strong>: The subject is set in the Java code like <code>String subject = "Hello - what's next?";</code>. It's then set to the message object (a MimeMessage) with <code>message.setSubject(subject);</code> However, when the email is sent, the subject line renders as: "Hello â€“ what's next?"</p>

<p><strong>What I've tried</strong>: I've searched for solutions and came up with <a href="https://stackoverflow.com/questions/4086717/why-do-symbols-like-apostrophes-and-hyphens-get-replaced-with-black-diamonds-on">this question</a> which is what made me think it's a problem with encoding. I worked through the various methods which are called to send the email, and can't find anything that sets the encoding though. I also checked the email template itself and the encoding there is set like so:</p>

<p><code>&lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /&gt;</code></p>

<p><strong>What I'm looking for</strong>: I need to know either a) How to find out from my code which encoding to use in my HTML, or b) how to set the encoding of the subject line IN Velocity Mail Manager. (Or c) any other tips to solve the problem.)</p>

<p>Thanks!</p>