Skip to Content

SAP PO 7,5 SFTP sender encoding conversion ANSI to UTF-8

Hi all,

Could anyone help with a issue about encoding in SFTP adapter? (ANSI File to utf-8 conversion idoc)

I have set the channel with corresponding modules, then message LOG seems ok but there are still characters like Ñ that are not converted so the result message is not utf-8 valid.

Example of string with special character from original file (encoding ANSI)

“PLAZA NUESTRA SEÑORA DE LA LUZ”

SFTP (Content conversion) configuration

Payload after conversion: encoding UTF-8 and same content populated to idoc:
<STREET>PLAZA NUESTRA SE�ORA DE LA LUZ 5 4,</STREET>

Message LOG:

What could be done to get a correct conversion?

I have converted the file in an on-line independent converter and works ok, but PI SFTP adapter seems not to make the conversion correctly.

Thanks in advance

channel.jpg (81.6 kB)
message-log.jpg (13.3 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Jan 05 at 08:49 AM

    Solved with note 2544233 by adding a parameter in advanced options of Sender SFTP channel: encodingFormat = ISO-8859-1

    Thanks and regards,

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 20, 2017 at 08:24 AM

    Hi Ilie!

    Frankly speaking, I have no idea why the approach given in the blog described above didn't work for you.

    I've just tried it using provided source file:

    Resulting text file content at receiver's side:

    As you can see, file content is correctly converted to UTF-8.

    Maybe, it's some kind of issue at receiver system?

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

    • I used pass-through configuration with code page conversion in sender SFTP adapter. And the receiver of the file is SFTP adapter too.

      If you see the correct UTF-8 content in Message monitoring, try to open the message and save payload to text file. If the content of saved file looks as expected while being opened using UTF-8 codepage, I guess it's converted without issues.

      For testing purposes try to replace your receiver IDoc adapter with File adapter, for example, save result IDoc message to file and check the encoding. If it's ok, you should check if your receiver system is able to use UTF and if respective settings are set up.

      Regards, Evgeniy.

  • Dec 19, 2017 at 11:43 AM

    Hi Ilie!

    Look at this blog. I hope it will help.

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

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 19, 2017 at 10:47 AM

    Same result incorrect if conversion is from CP1252 to utf-8.

    Add comment
    10|10000 characters needed characters exceeded