News:

  • May 03, 2026, 05:45:50 AM

Login with username, password and session length

Author Topic: Looking at STRING byte values in Hexadecimal format  (Read 7474 times)

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3806
    • Host Engineering
Looking at STRING byte values in Hexadecimal format
« on: May 17, 2013, 02:25:31 PM »
This question came up recently, and I thought I would post it here so everyone can enjoy the answer ;D.

How do you look at a STRING's data buffer in Hexadecial, not as Text/ASCII???

It’s supported in Data View by changing the STRING element display format.  In addition to the default ASCII format for STRING elements, there is Quoted, Hexadecimal, 4 Hex/ASCII (4 characters per row), 8 Hex/ASCII, 16 Hex/ASCII, 24 Hex/ASCII, and 32 Hex/ASCII).

Any of the last Hex/ASCII formats will display all Hex values along with the equivalent ASCII.  The Hexadecimal format will display just the Hex BYTE values in the buffer (if that’s all you need).  Even the Quoted will display any non-ASCII in their hex equivalent like an escape sequence, "Hello$0D$0A" for the text "Hello" followed by a CR/LF.  No programming is needed.  No data buffers needed.  It’s all there.  You can even edit it in Hex using the Quoted format by using the $ escape sequence (e.g. "$0D$0A").

The attachment DataViewStrings2.png is an example of a CR/LF terminated sentence of "The quick brown fox jumped over the lazy dog." (ASCII, Quoted, Hexadecimal, 4 Hex/ASCII , and 16 Hex/ASCII).  Note that the ASCII format displays a dot for any non-displayable ASCII (so the trailing CR and LF shows as dots).

« Last Edit: May 17, 2013, 02:55:13 PM by franji1 »


Sorry, this topic is locked. Only admins and moderators can reply.