You are here: PSPad forum > English discussion forum > File opens in hex mode

File opens in hex mode

Goto Page: 1 2 Next

#1 File opens in hex mode

Posted by: idefix2 | Date: 2018-06-07 09:58 | IP: IP Logged

Hi!
I have to edit a textfile that is in the old MSDos format.
When I try to open this file in PSPad, PSPad opens the file in hex mode. How can I persuade PSPad that that file is a normal textfile and not a binary file?

Edited 1 time(s). Last edit at 2018-06-07 09:59 by idefix2.

Options: Reply | Quote | Up ^


#2 Re: File opens in hex mode

Posted by: vbr | Date: 2018-06-07 10:45 | IP: IP Logged

idefix2:
Hi!
I have to edit a textfile that is in the old MSDos format.
When I try to open this file in PSPad, PSPad opens the file in hex mode. How can I persuade PSPad that that file is a normal textfile and not a binary file?

Hi,
there might be autodetection active, which you can disable in special settings:
Settings: Program settings:
[Direct edit]

in the section Special settings - set:
AutoDetectBinary=0

hth,
vbr

Edited 1 time(s). Last edit at 2018-06-07 10:45 by vbr.

Options: Reply | Quote | Up ^


#3 Re: File opens in hex mode

Posted by: pspad | Date: 2018-06-07 11:56 | IP: IP Logged

PSPad detects non text chars and if finds it in file, PSPad opens it in HEX editor to prevent file damage.
You can switch off this detection - see the answer from VBR above.

Options: Reply | Quote | Up ^


#4 Re: File opens in hex mode

Posted by: idefix2 | Date: 2019-02-13 19:49 | IP: IP Logged

This automatic detection makes sense in most cases, turning it off generally is not such a good idea, and turning it off for just one file and back on afterward is a very uncomfortable workaround.

It would be great to have a "mode change button" that switches between text and binary mode. If the file having been changed causes problems, the button could be deactivated as soon as changes to the file content have been made.

Edited 1 time(s). Last edit at 2019-02-13 19:50 by idefix2.

Options: Reply | Quote | Up ^


#5 Re: File opens in hex mode

Posted by: Gabriel_ACE | Date: 2019-02-13 21:35 | IP: IP Logged

pspad:
PSPad detects non text chars and if finds it in file, PSPad opens it in HEX editor to prevent file damage.
You can switch off this detection - see the answer from VBR above.

I think it is better if pspad ask what to do in thats case

somthin like

"the file that are trying to open may be binary file, do you want to open in HEX editor?"
ACCEPT CANCEL

what do you think?

smiling smiley

Options: Reply | Quote | Up ^


#6 Re: File opens in hex mode

Posted by: pspad | Date: 2019-02-13 21:40 | IP: IP Logged

It's no problem to show question dialog. But again it should be optional.

For now it's no problem to close file and use right mouse over your file and choose PSPad Hex to open it directly in HEX editor

Options: Reply | Quote | Up ^


#7 Re: File opens in hex mode

Posted by: pspad | Date: 2019-02-13 22:21 | IP: IP Logged

OK.
The AutodetectBinary variable in direct edit will have 3 values:
0: no autodetection
1: autodetection with automatic HEX edit opening
2: autodetection with confirmation question

Options: Reply | Quote | Up ^


#8 Re: File opens in hex mode

Posted by: idefix2 | Date: 2019-02-13 23:34 | IP: IP Logged

Great!

The dialog should of course have 3 options:
open in text mode
open in hex mode
cancel

Because I need to open these files in text mode though pspad believes they are binary files.

Edited 2 time(s). Last edit at 2019-02-13 23:39 by idefix2.

Options: Reply | Quote | Up ^


#9 Re: File opens in hex mode

Posted by: Gabriel_ACE | Date: 2019-02-14 14:35 | IP: IP Logged

pspad:
OK.
The AutodetectBinary variable in direct edit will have 3 values:
0: no autodetection
1: autodetection with automatic HEX edit opening
2: autodetection with confirmation question

Excelente! grinning smiley

one more thing

I think AutodetectBinary must be by default "2" (because there are soo many people that aren't expert ( standar users don't know what it is a hex edit and think is an bug from PSPAD ) using hex editor and their don't know what to do when pspad open in thats mode)

what do you think?

Options: Reply | Quote | Up ^


#10 Re: File opens in hex mode

Posted by: pspad | Date: 2019-02-14 14:42 | IP: IP Logged

Gabriel_ACE:
pspad:
OK.
The AutodetectBinary variable in direct edit will have 3 values:
0: no autodetection
1: autodetection with automatic HEX edit opening
2: autodetection with confirmation question

Excelente! grinning smiley

one more thing

I think AutodetectBinary must be by default "2" (because there are soo many people that aren't expert ( standar users don't know what it is a hex edit and think is an bug from PSPAD ) using hex editor and their don't know what to do when pspad open in thats mode)

what do you think?

I don't think so.
I don't want to change behavior what stays many years same.
For whole time I get only few request how to switch off autodetection.

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