Page 1 of 1

End of line styles ignored in v8.0

Posted: Sun Oct 20, 2019 7:55 pm
by systemsplanet
1st file has 0d 0a line ending
2nd file has 0d

2nd file is treated as one long line

Settings: Treat both files as text, Ignore line ending styles, use view filter

Both files attached below

Re: End of line styles ignored in v8.0

Posted: Mon Oct 21, 2019 12:24 pm
by MSpagni
2nd file has 0d
Nope. It has 0a, unix style.
2nd file is treated as one long line
Worse than this. I see only a long line of the usual placeholder for "unprintable" characters.
This looks a lot like a bug. :)

N.B. EDP 10.

Re: End of line styles ignored in v8.0

Posted: Tue Oct 22, 2019 1:31 am
by JeremyNicoll
systemsplanet wrote: Sun Oct 20, 2019 7:55 pm 1st file has 0d 0a line ending
2nd file has 0d

2nd file is treated as one long line

Settings: Treat both files as text, Ignore line ending styles, use view filter

Both files attached below
I don't see what you describe. The first file has

0A at offsets +5F and +17D and +1BA - no adjacent chars are 0D

and
0D at offsets +CE and +DB and +E5 - no adjacent chars are 0A

So there are NO instances of 0D0A.

The second file has

0A at offsets +55 and +17C and +1B9 - no adjacent chars are 0D

and contains no 0D bytes at all.

I viewed the files using: https://mh-nexus.de/en/hxd/ albeit not the most
recent version - v1.7.7.0 - because that's what I last installed.

Ah. AH. Right - now I see it. YOU FORGOT TO SAY THAT THE .7z files should
be unpacked. I (and I expect MSpagni) looked directly at the contents of the
7z files themselves.

Re: End of line styles ignored in v8.0

Posted: Tue Oct 22, 2019 9:52 am
by MSpagni
No, Jeremy, I unpacked the archives.
It makes no sense to speak of text when it's packed: in that case it's binary.

Re: End of line styles ignored in v8.0

Posted: Tue Oct 22, 2019 1:44 pm
by psguru
The issue here is that EDP treats the second file as Unicode.

Why? With missing BOMs, EDP uses the Windows API IsTextUnicode(), and this function sometimes gets confused. It is also used by Notepad, so if you open your file in Notepad, you will see the same result. Why the API is confused is hard to tell, it uses a number of heuristics to determine encodings.

You can force ANSI encoding by opening the File Open dialog (click on the Browse button next to the file path drop-down) and selecting ANSI in the Encoding combo. Once you do this, the files will be indeed identical.

Re: End of line styles ignored in v8.0

Posted: Wed Oct 23, 2019 10:22 am
by MSpagni
Understood.
Thanks.