cancel
Showing results for 
Search instead for 
Did you mean: 

Encoding issue in idoc to file scenario

PS23
Participant
0 Kudos

Hi All

We have encoding issue for idoc to file scenario.

File created in csv and encoding is utf-8.

When File is converted to .txt we still see few characters distorted but most of them are correct.

We have tried different encoding but nothing worked.

These are Croatian characters, attach is the file which have special characters which gets converted to ‘?’.

Can anyone suggest, would need it urgently.

Thanks

Accepted Solutions (0)

Answers (10)

Answers (10)

former_member186851
Active Contributor

Hello SAP PI,

Try the below encoding and check

  • ISO 8859-16
  • ISO-8859-2

https://blogs.sap.com/2014/10/09/character-encoding-handled-the-right-way/

PS23
Participant
0 Kudos

Thank you for all the suggestions we have tried TextCodepageConversionBean with ISO-8859-2 which worked.

former_member182412
Active Contributor
0 Kudos

Can you close the question then?

former_member186851
Active Contributor
0 Kudos

Hello,

I already told you same encoding-ISO-8859-2 so PI is able to convert it properly.

You can suggest them to change encoding in Excel,Before proceeding you can get the file and try locally

https://help.surveygizmo.com/help/encode-an-excel-file-to-utf-8-or-utf-16

Former Member
0 Kudos

excel.jpgnotepad.jpgHi Experts,

I have kept File Type:Text, Encoding:utf-8 and TextCodepageConversionBean to set charset as ISO-8859-2. The output file if opened in Excel, all the Croatia characters are interpreted where as same file looks perfect in Notepad++.

User exports file in excel. Attaching view of both file. Please suggest.

Thanks,

Priyanka

former_member182412
Active Contributor
0 Kudos

Hi Priyanka,

What is your source encoding when it comes from ERP?

Regards,

Praveen.

Ryan-Crosby
Active Contributor
0 Kudos

Hi Priyanka,

If the file looks good after being generated from PI then it's not a system issue - it's a user education issue on how to import into Excel properly.

Regards,

Ryan Crosby

Ryan-Crosby
Active Contributor
0 Kudos

Hi.

Codepage cp1252 doesn't have those characters that you have mentioned. As Raghuraman had already suggested in the first answer it should be ISO-8859-2 which is Latin 2 and includes characters for the Croatian alphabet. Also, simply setting the text with type cp1252 doesn't force the system to convert the internal encoding of utf-8 to cp1252 - you still need to use the TextCodepageConversionBean for that part.

Regards,

Ryan Crosby

former_member186851
Active Contributor
0 Kudos

Hello Priyanka,

can you download the file from server and post the screenshot?

Former Member
0 Kudos

Hi Experts,

Croatian characters are :č, ć, đ, š, ž.

In the receiver channel we are using file Type: Text and Encoding: cp1252 under the processing tab which generates CSV file in ANSCI format and all the characters are appearing correctly except c which is replaced by e.

No other encoding is working.

Please suggest.

Thanks,

Ryan-Crosby
Active Contributor
0 Kudos

Hi,

TextCodepageConversionBean should be working assuming that the source encoding is correct and all the proper configuration is setup on the file receiver side. Can you share a sample source IDoc with some of the character culprits as an attachment and also share screenshots of your file receiver configuration?

Regards,

Ryan Crosby

former_member186851
Active Contributor
0 Kudos

Hello SAP PI,

How your handling CP1252 encoding?at the mapping level?

PS23
Participant
0 Kudos

hI Raghuraman

Thanks, but no luck.

TextCodebased bean not working.

Rather encoding Cp1252 is working for most of he characters except uable to convert c.

Any suggestions. Thanks