Topic "unix -> windows text transfer dropping embedded Ctrl-M"

Author Message
alfp
[View user's profile]

Joined: 2008-02-14
Posts: 13
Location: The University of Melbourne
When transferring a text file which contained an embedded Ctrl-M character not associated with any line terminator from unix to windows with SFTP protocol, the Ctrl-M character gets dropped. This does not occur when doing a text transfer on a similar file from windows to unix. I would have expected that Ctrl-M characters would only be stripped in a text transfer if associated with a line terminator, and then only for a transfer from windows to unix. Is this expected behaviour or is this a bug?

I am using WinSCP 4.0.6 (build 358) which I believe is the latest. I cannot verify if this also happens with FTP protocol as our unix hosts only accept SFTP connections.
Advertisements
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
This has been fixed already. See tracker entry.
_________________
Martin Prikryl
ransue
[View user's profile]

Joined: 2008-05-19
Posts: 1
prikryl wrote:
This has been fixed already. See tracker entry.


I get a "You do not have permission to access this document." from that page. Can you explain how to set up so ^Ms are not showing up on the unix side? I am on version 4.0.3 Build 345
Thx
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
This has been fixed in 4.1 beta.
_________________
Martin Prikryl
mikew

Guest


prikryl wrote:
This has been fixed in 4.1 beta.


This is still happening for me. version 4.1.7
alfp
[View user's profile]

Joined: 2008-02-14
Posts: 13
Location: The University of Melbourne
mikew wrote:
prikryl wrote:
This has been fixed in 4.1 beta.


This is still happening for me. version 4.1.7


I have just re-tested my original case with SFTP protocol using both versions 4.1.6 & 4.1.7, and the Ctrl-M is not being dropped. Which protocol are you using?

Alf.
sindy12
[View user's profile]

Joined: 2011-08-08
Posts: 2
Location: USA
My, version 4.1.beta works in a right way Wink
Devendra Narvariya

Guest


When I transfer any file from windows to my AIX server CTRL+M character is displayed in every editable file when opened with VI editor. ALso such file do not get executed because of presence of this character, why CTRl+M character pops up while transferring the file. Is there any reason for this or its just a BUG.
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Devendra Narvariya wrote:
When I transfer any file from windows to my AIX server CTRL+M character is displayed in every editable file when opened with VI editor. ALso such file do not get executed because of presence of this character, why CTRl+M character pops up while transferring the file. Is there any reason for this or its just a BUG.

Is the character present in the source file? Depending on that, do you want WinSCP to transfer file intact (i.e. you believe WinSCP is adding the character [this is unlikely])? Or do you want WinSCP to strip the character when uploading? For that see:
http://winscp.net/eng/docs/transfer_mode
Devendra Narvariya

Guest


prikryl wrote:
Devendra Narvariya wrote:
When I transfer any file from windows to my AIX server CTRL+M character is displayed in every editable file when opened with VI editor. ALso such file do not get executed because of presence of this character, why CTRl+M character pops up while transferring the file. Is there any reason for this or its just a BUG.

Is the character present in the source file? Depending on that, do you want WinSCP to transfer file intact (i.e. you believe WinSCP is adding the character [this is unlikely])? Or do you want WinSCP to strip the character when uploading? For that see:
http://winscp.net/eng/docs/transfer_mode


I checked the files on Windows XP with various editors but CTRL+M character is not shown. But after file transfer those CTRL+M character appears when I use VI editor.


Regards

Devendra Narvariya
martin
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 24555
Location: Prague, Czechia
Devendra Narvariya wrote:
I checked the files on Windows XP with various editors but CTRL+M character is not shown. But after file transfer those CTRL+M character appears when I use VI editor.

Have you tried some binary viewer?
_________________
Martin Prikryl
Devendra Narvariya

Guest


prikryl wrote:
Devendra Narvariya wrote:
I checked the files on Windows XP with various editors but CTRL+M character is not shown. But after file transfer those CTRL+M character appears when I use VI editor.

Have you tried some binary viewer?


No. The editors I tried on Windows XP were Notepad,Notepad++,Windows 2003 office, WordPad.
nooneinparticular

Guest


#!/bin/ksh
if [ "$1" = "" ]
then echo ""
echo "Parm 1 FileName (required)"
echo ""
return
else FileName="$1"
fi
cat ${FileName} | sed 's/.$//g' > ${FileName}.txt
chmod 770 ${FileName}.txt
mv ${FileName}.txt ${FileName}
Advertisements

You can post new topics in this forum






Search Site

What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!

Donate

About donations

$9   $19   $49   $99

About donations

Recommend

WinSCP Privacy Policy

WinSCP License