No announcement yet.

UNIX line endings are read as PC on the remote

  • Filter
  • Time
  • Show
Clear All
new posts

  • UNIX line endings are read as PC on the remote

    I'm connecting via SFTP to my Ubuntu 12 server and comparing a set of text files that are binary identical on the remote and the local directory.

    The problem is that BC detects that line endings on the remote files are "PC" while those on the local files are "UNIX". Of course, the line endings are LF on both sets of files.

    EDIT: Turns out this was caused by the transfer mode being set to "Auto".
    Last edited by dandv; 24-Feb-2014, 09:07 AM.

  • #2

    Auto would alter the line ending characters of text files as you bring them from one side to the other (allowing the file to then be opened by the native OS applications) with a Copy. BC3 itself can open and display either line ending. You can also switch to a Binary transfer to avoid the conversion during a copy (keeping the file sizes the same), but the file would then have trouble being read by some applications on the native OS if it still has the other form of line ending.

    It sounds like the file sizes you were dealing with were already equal, and you were hitting the unexpected behavior of the file opening/displaying with PC line endings on the unix machine? What OS was BC3 running on? Which file format/file type were you viewing in the Text Compare? If you enable View Whitespace, which line ending character symbol is shown, and are the file sizes equal in the Folder Compare, then different in the File Info status bar of the Text Compare?
    Aaron P Scooter Software