Your best friend for file transfer.

Fetch application logoFetch

Converting CR/LF to CR (6 posts)

This is an archived topic. The information in it is likely to be out-of-date and no longer applicable to current versions of Fetch.
  • Started 21 years ago by kgeiger61
  • Latest reply 21 years ago from Jim Matthews
  • kgeiger61 Member

    Can fetch convert Windows text files, with CR/LF as the line endings, to Mac text files, with CR at the end of each line, automatically? When I transfer them now, I get an extra blank line for each LF.

    Posted 21 years ago #

  • Jim Matthews Administrator

    If you download in Text mode Fetch will convert line endings to the style of your choice. The menu for choosing that style (new in Fetch 4.0.3) is in the Download section of Preferences.

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 21 years ago #

  • kgeiger61 Member

    Thanks Jim, for replying. I thought that should work and tried it. I have a simple text file on the server. It is a DOS file, with a CR/LF at the end of each line. In Fetch 4.0.3, I set the preferences to us "CR" at the end of each line. Making sure I am using text mode, I transfer the file. The resulting file on my Mac has a blank line between each text line. It seems Fetch is converting both the CR & the LF to CR.

    Posted 21 years ago #

  • Jim Matthews Administrator

    Do you know what kind of server the file is on? Servers are supposed to convert native line endings to CRLF, but if it was a UNIX server that would mean converting CRLF to CRCRLF (because LF is the native line ending on UNIX). Fetch would then convert CRCRLF to CRCR, leaving you with blank lines.

    I can't think of an easy way to fix this in Fetch. If you download the file in binary mode no characters will be changed, so you'll have CRLF line endings. A program like BBEdit Lite can convert that to use CR.

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 21 years ago #

  • kgeiger61 Member

    The file is originally being saved on a Windows machine onto a Samba share on a Linux server. I am using fetch to get the file off the Linux server onto the Mac.

    When I look at the file in Linux, it has CR/LF endings, so it is a DOS file format. I don't think there is any conversion happening in Linux.

    Posted 21 years ago #

  • Jim Matthews Administrator

    The problem is that the FTP server software is treating text files as if they have UNIX line endings, but these files have DOS line endings. I will think about adding an option to Fetch to work around this problem.

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 21 years ago #

Topic closed

This topic has been closed.