cancel
Showing results for 
Search instead for 
Did you mean: 

Character Encoding Issue - Flat File to JDBC

azharshaikh
Active Contributor
0 Kudos

Hi,

We are facing an issue in Flat file to JDBC Scenario (SAP PI 7.4 Single Stack). The issue is that the special characters in the Flat file are not getting processed properly. As per observation, which appears strange to me, File from Message monitor->Database tab -> Main document (from the specific message) is having correct characters. I don’t observe any distortion of special characters and I can see the special chars clearly in that file. PFB the screenshot for better understanding



However, when I open the same message by clicking on Open Message button (it opens Message Editor: Versions window) I see that the special characters are distorted (getting converted to Boxes). The log version which I am seeing is MS. As per my understanding this is right before the execution of Message mapping. PFB the screenshot of the same. In the receiver side the same distorted chars get mapped which is causing issue.



P.S: We are using Java Mapping to directly read and map Flat File into JDBC XML structure. All the English char data payload is working fine, issue is happening only with Foreign language chars as shown abv.


Why is PI showing 2 different variant of Input Payload data? How & why the chars are getting distorted in PI in MS step?


Please suggest on way to handle this & possible reasons for this issue.


Regards,

Azhar

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Azhar,

Not sure on why PI is showing two different variants of input payload data. However, you can address this issue by specifically setting the encoding in your SFTP channel. To do this, use MessageTransformBean in Modules tab and set Transform.ContentType value to desired encoding.

Thanks,

Rahul

azharshaikh
Active Contributor
0 Kudos

Hi,

As suggested in the following link:

After using MTB we are able to see the chars correctly in Open Message - Payload section as well.

Regards,

Azhar

Answers (3)

Answers (3)

vinaymittal
Contributor
0 Kudos

the reason for diff is that the main document shows the content without applyting any content-type transformation/distortion on the flat file

But the message editor as you can see shows content-type as UTF-8 which cannot accomodate the special characters

you need to change the content-type while handling it in java mapping or may be at adapter level.

sahithi_moparthi
Contributor
0 Kudos
Former Member
0 Kudos