Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 10116

XML encoding="utf-16" problem

$
0
0

Gurus,

 

I am trying to E-mail an XML file, to do so I am converting ABAP Internal Table to XML using Syntax

 

CALL TRANSFORMATION ZXMLF
       SOURCE dataset = gt_final
     RESULT XML  xml_out.


Here xml_out is of type string.


So I am converting xml_out to xstring using FM SCMS_STRING_TO_XSTRING and thereafter

converting the Xstring data to binary using SCMS_XSTRING_TO_BINARY.


And from there I am dispatching the data via E-mail.


The problem is when I recieve the E-mail and open the file it gives error as shown in the screenshot.


and when I edit the file and change the encoding

encoding="utf-16" to encoding="utf-8" it works fine. Now I do realize that if I use the xml_out type as xstring  I will get encoding 8 by default.. but that doesn't work either though the attached file contains encoding 8.. It gives the same error as above screenshot.. Please guide me how to fix this


Viewing all articles
Browse latest Browse all 10116

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>