Saving file only puts CR and not CRLF at end of lines

General questions about using ExamDiff Pro, ideas for new features, bug reports, and usage tips.
Post Reply
mikezx6r
New Member
Posts: 2
Joined: Thu Nov 11, 2004 7:44 am

Saving file only puts CR and not CRLF at end of lines

Post by mikezx6r »

I've just noticed this, although it has (unknown to me) been causing problems for awhile.

First, I'm using 3.2 Build 2004/03/06 5:03:36 PM, so if the problem has been fixed in a newer version, please let me know and I'll pay to upgrade.

If I compare 2 files, and have 'allow edits' enabled on. I copy changes from File1 to File2. I then save File1. If I open it in a binary editor, all of the lines are terminated with x'0A' (CR I believe). The file originally had x'0A'x'0D' (CRLF) characters at the end, and this is what is expected by most windows applications.

Are you aware of this problem? I looked for an option to control the line termination characters, but didn't see one. Did I merely miss the option?

Thanks for a great product, and your assistance
Mike
User avatar
psguru
Site Admin
Posts: 2232
Joined: Sat May 15, 2004 4:23 pm
Location: California
Contact:

Post by psguru »

The way EDP saves line endings in files is as follows: it uses the very first CRLF style used in a file as the style to be used during saving. E.g. if your file's first line has CR (0x0D) ending (Mac-style), EDP will save the file with CR endings, even though some other lines may user Unix (LF) or DOS (CRLF) styles. That said, the latest (3.2c) version does not properly recognize LF-style endings (it treats them as CRLF endings). The other two styles are properly detected. The fix will appear in the next public build.
psguru
PrestoSoft
mikezx6r
New Member
Posts: 2
Joined: Thu Nov 11, 2004 7:44 am

Post by mikezx6r »

I just did a test on XP Home SP1.

I created a test file, test.txt. I opened it in my editor in binary mode. Confirmed that ALL 3 lines end with CRLF.

I then copied test.txt to test2.txt. Deleted some info from the file.

Then did a compare of test.txt to test2.txt. Used 'Replace Block in Other File' to copy changes from test2.txt to test.txt. Then saved test.txt

Open test.txt in my editor in binary mode, and the line endings are now x'0A'.

I am running an older version (3.2).

Just downloaded 3.2c, and for CRLF, it appears to work correctly now. Guess I'll have to pay for the upgrade :(
Post Reply