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

Comments are closed.

Niklas Tech Blog
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.