Skip to Content
0

SFTP Adapter -Text Encoding

Oct 24, 2016 at 10:39 AM

501

avatar image
Former Member

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,

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

avatar image
Former Member Oct 24, 2016 at 10:51 AM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Oct 24, 2016 at 11:11 AM
0

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?

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

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

0
Former Member

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.

0
Ryan Crosby Oct 24, 2016 at 05:25 PM
0

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

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Oct 25, 2016 at 02:42 AM
0

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.


filetype.png (5.4 kB)
Share
10 |10000 characters needed characters left characters exceeded