Page 1 of 1

Done: Text view not obviously visible when pasting non-hex

Posted: 11 Aug 2017 11:56
by DominicCronin
I opened HxD and attempted to paste some text. My purpose was to see what the bytes were. (Whether this was wise, given what the clipboard is capable of, is another question.)

I got an alert saying:

"Pasting is not possible as the text in the clipboard contains invalid values. If you want to paste text, move to the text column."

Fair enough - I don't mind that, but the "text column" isn't visible. I looked in the menus, and couldn't find an obvious way to make the text column visible.

So then I typed some random bytes in, and sure enough the equivalent text appeared on the right, and when I tried, I could paste text there.

This could be fixed with a minor UI tweak: making the text area visibly distinct from the bytes. It's currently one big white expanse. There's space above the text view to put a header: "Text view". Some kind of visible column divider would help too.

You might also consider automatically pasting non-hex content into the right place.

Re: Text view not obviously visible when pasting non-hex

Posted: 11 Aug 2017 12:43
by Maël
Regarding the text area not being so easily discoverable, I agree. You can tab to the other side or click, but there is no explicit indicator when the file is blank. Some hints though are there: you have a "ghost" copy of the caret, a dotted rectangle on the non-active side, and you have a header with offset column captions (00 01 02 03 ...) over the hex area.
There's space above the text view to put a header: "Text view".
That's a good suggestion, or maybe putting the name of the text encoding there.
You might also consider automatically pasting non-hex content into the right place.
There is no way to determine what is text or hex in general in the Windows clipboard. There is only a text format, no universal binary format. That's why you have to pick the interpretation implicitly by picking the right column (text or hex). Once you know that, I think it's more convenient than to explicitly pick a special paste command, or to experience an apparently random change of the column, depending on the interpretation of text data (that might not always be right).

In cases where some known binary encodings of other hex editors are used that can be detected, this is translated automatically, but this is not possible in general.

But it would be possible to ask: "Do you want to switch to the text area and paste there?

Note that if you copy and paste from within HxD this is not an issue, since true (and complete) binary data can be copied and the data in the clipboard does not have to be interpreted (an internal clipboard is used on top of the Windows one.) So in this case it does not matter where you paste, it has the same meaning.

All this just to say that a lot of thought went into this design, but you have to work around some limitations that cannot be avoided.

Re: Text view not obviously visible when pasting non-hex

Posted: 06 Feb 2019 15:50
by Maël
Header implemented in HxD 2.0 for text column, which also should fix this issue.