Text view not obviously visible when pasting non-hex

Wishlists for new functionality and features.
Post Reply
DominicCronin
Posts: 1
Joined: 11 Aug 2017 11:46

Text view not obviously visible when pasting non-hex

Post by DominicCronin » 11 Aug 2017 11:56

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.

Maël
Site Admin
Posts: 781
Joined: 12 Mar 2005 14:15

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

Post by Maël » 11 Aug 2017 12:43

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest