JAXB messing up encoding in Mule flow
<p>I'm running a flow in Mule CE and have huge problems with encodings. No matter what I do my files end up with messed up non-english charcters.</p>

<p>Before the jaxb-object-to-xml transformer my payload looks nice in the console and in the debugger, but after that it's all messed up.</p>

<pre><code>    ......   
    &lt;http:request&gt;
    &lt;object-to-byte-array-transformer encoding="UTF-8" doc:name="Object to Byte Array"/&gt;
    &lt;object-to-string-transformer doc:name="String" encoding="UTF-8"/&gt; 
    &lt;json:json-to-object-transformer returnClass="java.util.List"  doc:name="JSON2ObjectList" encoding="UTF-8"/&gt;
    &lt;collection-splitter doc:name="Collection Splitter"/&gt;
    &lt;choice doc:name="Choice"&gt;
       &lt;when expression="...."&gt;
        &lt;custom-transformer returnClass="se.system.Order.SalesHeader"  class="se.system.Transformer.Map2Order" doc:name="Map2Order" mimeType="application/xml" encoding="UTF-8"/&gt;
        &lt;mulexml:jaxb-object-to-xml-transformer name="orderMarshaller" jaxbContext-ref="JAXB_Context" doc:name="orderMarshaller"  mimeType="text/xml" encoding="UTF-8"/&gt;
    &lt;object-to-string-transformer doc:name="XML2String" encoding="UTF-8"/&gt;
    &lt;set-variable variableName="fileName" value="order-#[function:dateStamp].xml" doc:name="fileName" encoding="UTF-8"/&gt;       
    &lt;file:outbound-endpoint path="${file.ToOrder}" responseTimeout="10000" doc:name="File" outputPattern="#[fileName]" mimeType="text/xml" encoding="UTF-8"/&gt;
</code></pre>

<p>After the jaxb transformer non-english characters looks like: </p>

<pre><code>Deliveryinfo2="Ã¥ Ã¤ Ã¶ Ã… Ã„ Ã– &amp;amp; % Ã¨ Ã‰"/
</code></pre>

<p>And the 010 editor claims its ANSI DOS (with messed up characters, don't know if that one is to be trusted though)
Have I missed something in the jaxb transformer? or somewhere else?
Is it possible to replace it with a Java component, initiate my very own JAXB context, get a marshaller and handle it myself?
No clues anymore...</p>

<p>Regards</p>

<p>EDIT: this one can handle non-english characters</p>

<pre><code>&lt;mulexml:object-to-xml-transformer doc:name="Object to XML" encoding="UTF-8" /&gt;
</code></pre>

<p>but not GregorianCalendar types or my main Objects List of other objects so it's  not an alternative</p>