Mule 4: Set the output encoding on a flat file transformation

Every now and then you are working on a UTF-8 system and you have to deliver a flat file (or any other string) to a ISO-8859-1 system, as an example. To achive this we need to tell Mule that we want the result in ISO-8859-1 and not the default UTF-8.

This can be solved like this:

%dw 2.0
output application/flatfile encoding="ISO-8859-1"

Without the “encoding=ISO-8859-1” we would get the default UTF-8 encoding. This works of course for many other encoding-transformations

Tested on Mule 4.3, Anypoint Studio 7.11 on Windows 10

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre lang="" line="" escaped="" cssfile="">

This site uses Akismet to reduce spam. Learn how your comment data is processed.