Loading

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

發佈日期: Mar 2, 2024
解決方案

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
知識文章編號

001117625

 
正在載入
Salesforce Help | Article