Skip to Content
0

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

Dec 19, 2017 at 10:08 AM

387

avatar image

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)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Best Answer
ILIE ALEMAN Jan 05 at 08:49 AM
0

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

Thanks and regards,

Share
10 |10000 characters needed characters left characters exceeded
Evgeniy Kolmakov Dec 20, 2017 at 08:24 AM
1

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.


Show 2 Share
10 |10000 characters needed characters left characters exceeded

This configuration is on a receiver SFTP CC? Mine is on sender sftp, and the receiver is an IDOC CC with no settings at all for encodings.. It might have something to do maybe with PO version or patch level.. I'm on it.

Thanks for your help.

0

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.

0
Evgeniy Kolmakov Dec 19, 2017 at 11:43 AM
0

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.

Show 4 Share
10 |10000 characters needed characters left characters exceeded

Hi Evgeny, I tested it but is not working, same result converting with strange characters.

Thanks,

0

Hi Ilie!

Wouldn't you mind to provide the source file?

Regards, Evgeniy.

0

It seems there is a issue about the type of my file.txt when trying to upload it here. Anyway you can just add the original text PLAZA NUESTRA SEÑORA DE LA LUZ in a txt file, open it with Notepad++ and make sure the encoding (top menu) is ANSI, and bottom right indicator also shows ANSI and Windows (otherwise notepad also allows converting it).

Thanks for your help.

0
0
ILIE ALEMAN Dec 19, 2017 at 10:47 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded