Skip to Content
avatar image
Former Member

Encoding issue in idoc to file scenario

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

10 Answers

  • Oct 24, 2016 at 05:43 AM

    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/

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 25, 2016 at 04:07 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 25, 2016 at 04:30 AM

    Hello SAP PI,

    How your handling CP1252 encoding?at the mapping level?

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 25, 2016 at 01:33 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 26, 2016 at 03:40 AM

    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,

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 26, 2016 at 04:13 AM

    Hello Priyanka,

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

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 26, 2016 at 12:39 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 28, 2016 at 06:39 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Oct 28, 2016 at 06:52 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 01, 2016 at 11:42 AM

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

    Add comment
    10|10000 characters needed characters exceeded