cancel
Showing results for 
Search instead for 
Did you mean: 

Facing Weird issue with XML to CSV !

das_sappo
Participant
0 Kudos
205

Dear Experts,

I am modifying XML to CSV and the scenario is working fine but when there is any Arabic chars in the field then the converted values getting exchanged/combined with next field value. Please suggest.

Input

<?xml version="1.0" encoding="utf-8"?>
<n0:MT_EHS_VendorMaster xmlns:n0="http://NGL.com/EHS/FI/GOUP/Emp" xmlns:prx="urn:sap.com:proxy:SIK:/1SAI/TAS05143118925D6813EB20:740">
<Records>
<Name>1000030398</Name>
<DisplayName>حسام رحال</DisplayName>
<InvoiceMatchingLevel>6-way</InvoiceMatchingLevel>
<Status>Active</Status>
</Records>
<Records>
<Name>1000030398</Name>
<DisplayName>Roger</DisplayName>
<InvoiceMatchingLevel>2-way</InvoiceMatchingLevel>
<Status>Active</Status>
</Records>
</n0:MT_EHS_VendorMaster>

"Name","Display Name","Invoice Matching Level","Status"
"1000030398","حسام رحال","6-way","Active"
"1000030398","Roger","2-way","Active"
manfred_reinart
Product and Topic Expert
Product and Topic Expert
0 Kudos

Which functionality are you actually using for this transformation? (code snippet)

das_sappo
Participant
0 Kudos

Hi Manfred,

I m using standard converter , XML to CSV.

manfred_reinart
Product and Topic Expert
Product and Topic Expert
0 Kudos

there are a lot of standard functions

please specify the exact (technical) name of the function you are using - and a code excerpt, if possible

das_sappo
Participant
0 Kudos

Hello Manfred,

I am using standard CPI converter . XML To CSV Converter .

das_sappo
Participant
0 Kudos

Using Below

Accepted Solutions (0)

Answers (1)

Answers (1)

MaAll
Explorer

Hi Arvik,

I am not sure on the cause, but I think it is related to the number 6 and the Arabic being treated as right to left direction, so the 6 is being added to the left of the Arabic characters in the output. It does the same when using some online XML to CSV converters too.

I think you might have to add some additional characters to force the Arabic to be embedded left to right. I've not done this myself, but hopefully this documentation might point you in the right direction - 2.1 Explicit Directional Embeddings.

Hope this helps!

Regards,

Matt

das_sappo
Participant
0 Kudos

Thanks Matt.

If I append any character to the Arabic string , I am getting correct output.

But later when I replacing the added chars with null (groovy-replace) then those values are again getting interchanged/combined.