简体   繁体   English

在Dataweave转换器中编码以实现UTF-8?

[英]Encoding in Dataweave transformer for UTF-8?

In dataweave transformer even after setting the output encoding as "UTF-8". 在dataweave变压器中,即使将输出编码设置为“ UTF-8”也是如此。 The chinese characters are getting changed. 汉字正在改变。 Could you please help suggest how to set the encoding UTF-8 for dataweave transformer. 您能帮忙建议一下如何为dataweave转换器设置编码UTF-8。 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. 如果我在.ini文件中设置了Dfile.encoding,则它可以工作,但是由于应用程序部署在云中,因此我想使用其他方式来实现它。 永康大灣永康區大灣路796號1樓 永康大湾永康区大湾路796号1楼

Before DW: 永康大灣 DW之前:永康大湾

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

%dw 1.0 %dw 1.0

%output application/xml encoding="UTF-8" %输出应用程序/ xml编码=“ UTF-8”

payload 有效载荷

NOTE: unicode literals are not supported yet 注意:目前尚不支持Unicode文字

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. 要转换特殊字符,例如日语字符,永康大湾永康区大湾路796号1楼,您需要检查输入文件的编码,如果输入文件的编码为“ UTF-8”,则不会产生问题这些特殊字符的转换。

Required encoding of input file is 'UTF-8' for handling of such chars. 输入文件的必需编码为'UTF-8',以处理此类字符。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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