You are here: PSPad forum > English discussion forum > Files with EOF marker (1Ah, Ctrl^Z) always show up in hex mode

Files with EOF marker (1Ah, Ctrl^Z) always show up in hex mode

Goto Page: 1 2 Next

#1 Files with EOF marker (1Ah, Ctrl^Z) always show up in hex mode

Posted by: ITWorxLA | Date: 2022-10-12 22:43 | IP: IP Logged

I have to deal a lot with older MS-DOS or even CP/M text files which might have a Ctrl^Z as EOF marker in the file. In that case, PSPad will always open the file in Hex mode and there doesn't seem to be an option to convince it to switch to normal editor mode.

Any options in order to have those files show up properly as text files?

thanks,
Ralf

Options: Reply | Quote | Up ^


#2 Re: Files with EOF marker (1Ah, Ctrl^Z) always show up in hex mode

Posted by: pspad | Date: 2022-10-13 03:18 | IP: IP Logged

You can switch off binary file detection in the program settings / direct edit button
Change line autodetectbinary=0

Options: Reply | Quote | Up ^


#3 Re: Files with EOF marker (1Ah, Ctrl^Z) always show up in hex mode

Posted by: ITWorxLA | Date: 2022-10-13 17:11 | IP: IP Logged

pspad:
You can switch off binary file detection in the program settings / direct edit button
Change line autodetectbinary=0

Thanks, I will try that. Though that sounds that it will bite me again when I in fact do want to use Hex mode on real binary files. We'll see...winking smiley

Options: Reply | Quote | Up ^


#4 Re: Files with EOF marker (1Ah, Ctrl^Z) always show up in hex mode

Posted by: pspad | Date: 2022-10-13 17:32 | IP: IP Logged

This is a autodetection only what prevents open HEX files in the editor.
You can always open any file in HEX editor from menu file or using Explorer - Open in Hex edit

Options: Reply | Quote | Up ^


#5 Re: Files with EOF marker (1Ah, Ctrl^Z) always show up in hex mode

Posted by: ITWorxLA | Date: 2022-10-17 14:50 | IP: IP Logged

Yeah, I get that. It's just that a text file with EOF markers is still a text file, even in 2022.
For me, right now this is a major inconvenience, as I work on a project that deals with A LOT of text files from the CP/M era, late '70s/early '80s. As well as a lot of files I DO want to open in the hex editor (.LBR files) to avoid opening up a separate program for that, so it is a bit of a "pick your poison" scenario.

Options: Reply | Quote | Up ^


#6 Re: Files with EOF marker (1Ah, Ctrl^Z) always show up in hex mode

Posted by: pspad | Date: 2022-10-17 16:42 | IP: IP Logged

Why is it bad? Use right mouse context menu to open file as text or as hex
Or use menu File/Open fot the same

Options: Reply | Quote | Up ^


#7 Re: Files with EOF marker (1Ah, Ctrl^Z) always show up in hex mode

Posted by: ITWorxLA | Date: 2022-10-17 20:19 | IP: IP Logged

It is nothing that makes PSPad impossible to use, it is just an inconvenience and IMHO just having a single Ctrl-Z at the end of the file doesn't make a binary file out of a perfectly valid text file.

Options: Reply | Quote | Up ^


#8 Re: Files with EOF marker (1Ah, Ctrl^Z) always show up in hex mode

Posted by: pspad | Date: 2022-10-18 07:58 | IP: IP Logged

Hello, there is no problem to remove Ctrl+Z (1A) from HEX file detection. I will do it for next build.

Automatic binary file detection is something what offer PSPad above the normal usage, it's not normal text editor functionality.

Options: Reply | Quote | Up ^


#9 Re: Files with EOF marker (1Ah, Ctrl^Z) always show up in hex mode

Posted by: ITWorxLA | Date: 2022-10-21 18:54 | IP: IP Logged

pspad:
Hello, there is no problem to remove Ctrl+Z (1A) from HEX file detection. I will do it for next build.

Automatic binary file detection is something what offer PSPad above the normal usage, it's not normal text editor functionality.

Thanks for considering this.

I have no problem with the basic concept of implementing binary file detection and to switch in Hex mode for that. That is in fact a feature that I use on a lot of occasions, as that allows me to avoid opening up another program to inspect a file in hex mode.

It's just that I am working with computers (and programming) long enough that I don't consider a text file ending with a Ctrl-Z (or padded to a 128-bytes sector with 1Ah, in case of a lot of files that come out of an LBR archive file) something unusual. I think this is just a special case that should be considered as such. It is just rather unfortunate that there are a lot of people (no personal offense intended, to make this crystal clear) that just don't recall the days when dealing with Ctrl-Z was a normal occurrence, even when DOS didn't need it anymore, at least since v2.0. And even Linux fanbois complain about it, even though Ctrl-Z in pretty much all shell implementations has a special meaning as well. Unfortunate signs of "modern" times.

Again, thanks for considering this,

Ralf

Options: Reply | Quote | Up ^


#10 Re: Files with EOF marker (1Ah, Ctrl^Z) always show up in hex mode

Posted by: pspad | Date: 2022-10-22 09:19 | IP: IP Logged

try current developer build. It shouldn't detect Ctrl+Z as binary file

Options: Reply | Quote | Up ^


Goto Page: 1 2 Next





Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR