Skip to Content

SAP CPI Sender File Adapter unable to convert unicode encoded csv file into readable format

The batch file is encoded in unicode and HCI unable to convert the csv file into XML format.
Below is the payload file export on CPI. Is there any way to convert the file format to a readable format before "CSV to XML converter"? Thank you.

capture.png (7.9 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Feb 08, 2019 at 05:31 PM

    you could try to plug this code in groovy

    String str = body.split(" ")[0];
    str = str.replace("\\","");
    String[] arr = str.split("u");
    String text = "";
    for(int i = 1; i < arr.length; i++){
        int hexVal = Integer.parseInt(arr[i], 16);
        text += (char)hexVal;
    }
    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.