cancel
Showing results for 
Search instead for 
Did you mean: 

Character Encoding from Flat File to XML

neilpadilla
Participant
0 Kudos

Hi Guys,

I am currently encountering an issue regarding Russian characters.

Scenario:

     Source File Server (Flat File, .txt)

     -> PI FTP Channel (Flat File, no XML Conversion)

     -> Adapter Engine (Flat File)

     -> Integration Engine (XML, IDOC structure)

     -> XI/HTTP Channel

     -> ECC (IDOC)

I have a flat file picked-up from the file server via FTP channel.

There is no XML conversion done by the sender channel.


This flat file will then be sent from Adapter Engine to Integration Engine.

In this flow, I encounter the issue.

The flat file is converted into an XML format with an IDOC structure.


In the XML payload in integration engine, the Russian characters are now converted into # symbols.

Sample Input:

    

Sample Output:

    

Could you please help me on this?


Regards,

Neil

Accepted Solutions (0)

Answers (2)

Answers (2)

apu_das2
Active Contributor
0 Kudos

For Russian language you need to use UTF-16 as its 2 byte data.

Thanks,

Apu

Former Member
0 Kudos

Hi Neil,

Check these , Let us know if it doesnt help.

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/502991a2-45d9-2910-d99f-8aba5d79f...

Regards,

Mudassir

former_member186851
Active Contributor
0 Kudos

Hello Neli,

You can handle encoding using

1.Beans

2. Using XSLT/Java mapping.

Refer the below discussion(it has all necessary links)

neilpadilla
Participant
0 Kudos

Hi All,

I further checked on how the flat file is being converted.

As per checking, the interface is currently using a function module to pick the file from the folder and then converts it into an xml with IDoc structure.

In the function module code, I have seen the encoding in the following line.

open dataset input_file for output in text mode encoding utf-8 IGNORING CONVERSION ERRORS .


Do you think this could be the part where it should be updated?


Regards,

Neil

former_member186851
Active Contributor
0 Kudos

if your encoding is UTF-8 no need to do any changes as it is default for SAP PI.