Loading

How To Enforce UTF-8 Encoding Of Transform Message Processor Output When Conducting MUnit Record Test

Date de publication: Mar 2, 2024
Résolution

SYMPTOM

The MUnit Record Test fails due to the inconsistency between the DataWeave XML encoding output and DataWeave input payload encoding in the Transform Message processor, An output like below will be written in the Console output during the MUnit record test:
**********************************************************************
* Domain: default *
* OS encoding: windows-1252, Mule encoding: UTF-8 *
* *
**********************************************************************

CAUSE

By default, DataWeave processes the payload in UTF-8 encoding but the encoding may be overwritten by Windows OS "windows-1252" encoding.

SOLUTION

Enforce UTF-8 encoding for output of Transform Message processor by adding "-Dfile.encoding=UTF-8" in the Preferences setting of MUnit "VM arguments for recorder" configuration.

screenshot
Numéro d’article de la base de connaissances

001117625

 
Chargement
Salesforce Help | Article