简体   繁体   中英

Encoding in Dataweave transformer for UTF-8?

In dataweave transformer even after setting the output encoding as "UTF-8". The chinese characters are getting changed. Could you please help suggest how to set the encoding UTF-8 for dataweave transformer. sample values are as below. if i set the Dfile.encoding in .ini file it is working but i want to achieve it using different way as the applications are deployed in cloud. 永康大灣

Before DW: 永康大灣

After DW: "æ°¸åº·å¤§ç £

%dw 1.0

%output application/xml encoding="UTF-8"

payload

NOTE: unicode literals are not supported yet

For transforming the special chars like as Japanese chars 永康大灣永康區大灣路796號1樓 you need to check the encoding of the input file and if input file has encoding as 'UTF-8' then it will not create the problem in conversion of these special chars.

Required encoding of input file is 'UTF-8' for handling of such chars.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM