cancel
Showing results for 
Search instead for 
Did you mean: 

SFTP Adapter -Text Encoding

silentbull
Participant
0 Kudos

Hi

I am using SFTP - Receiver Adapter and that converting a scenario which was in FTPS to SFTP. The previous FTPS was using File encoding in UTF-8 in Text mode. While testing in SFTP we found out that it was missing a carriage return due to which the testing failed. Can you please confirm how to set UTF-8 /Text mode as trasnfer in SFTP-Receiver adapter.

Regards

Sam,

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member182412
Active Contributor
0 Kudos

Hi Sam,

If you want to transfer the file as it is then in the sender file adapter select the file type as binary.

Regards,

Praveen.

Ryan-Crosby
Active Contributor
0 Kudos

Hi Sam,

What is the content of the file before it is transmitted? It only has 0D and you are expecting the system to insert the 0D 0A after it is processed as text? Also, if this was configuration that was setup on the receiver side for the FTP then just move that same setup to the sender FTP side and see if it solves your problem. As far as the SFTP adapter not having the text choice that makes sense because the data is encrypted for transit and isn't going to read like straight text.

Regards,

Ryan Crosby

silentbull
Participant
0 Kudos

Hello Praveen

There is no FCC over here since all I am doing is transferring a file from one server to another server. Earlier the scenario was between FTP to FTPS, now the scenario is FTP to SFTP.

In the earlier scenario, I have seen the channel for FTPS using file transfer mode as TEXT and the encoding as UTF-8. Now, I don't see that option in SFTP.

This is what i have been told by the investigation team.

We receive 2 carriage returns followed by a line feed for each record (CR/LF). These are represented in the data as

0D 0D 0A. This month, however, we have only received one carriage return followed by a line feed, or 0D 0A.

Am not sure which is the correct approach?

former_member182412
Active Contributor
0 Kudos

Can you attach the source file with one two lines so that i can check on my side.

stefan_grube
Active Contributor
0 Kudos

These are represented in the data as 0D 0D 0A.
This month, however, we have only received one carriage return followed by aline feed, or 0D 0A.

0D 0D 0A is wrong and does not make sense. 0D 0A is correct.

What are your issues with 0D 0A? This is how it should be.

former_member182412
Active Contributor
0 Kudos

Hi Sam,

You said in the receiver file carriage return was missing, i think this is could be problem with file content conversion not with encoding. Please explain your problem more clear so that we can able to help you.

If you want to set the target file encoding then SFTP adapter does not support encoding by default you can use the below two modules in receiver SFTP adapter.

MessageTransformBean with parameter Transform.ContentType = text/plain;charset= source encoding

TextCodepageConversionBean with parameter Conversion.charset = UTF-8

Regards,

Praveen.