Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there UNICODE symbols for hex representation?

I want to dump a data stream, and display say the character 0x12 as ONE CHARACTER '12' with maybe a tiny '1' in top left corner and '2' in bottom right. There is a similar concept with UNICODE Control Pictures https://en.wikipedia.org/wiki/Control_Pictures which displays 'DC2' as one character, with a tiny 'D' top left and '2' bottom right - but I would like it in hex.

EDIT I can easily display non-printable bytes as 2 characters e.g. byte 0x12 as 'x' + '1' + '2' but that takes 3 print positions. I want it to print as similar to '%' where the top left '0' is replaced by a small graphical '1' and the bottom right '0' replaced by a small graphical '1', and no graphical stroke. This is not some convert-to-printable-for-transmission-purposes like base64; this is to enable me to print non-display bytes and view their internal bit representation.

Maybe an example would help. Let's take a 32-bit value(4 bytes) of 0x00004050 (big-endian); I want to see 4 characters something like '%%@P'

EDIT2 The UNICODE text generated will be written to a UNICODE log file, for viewing by eyeball in a text editor, browser, or similar. Using UNICODE Control Pictures I could do that now, but I want HEX and not the C0 Control Name abbreviation displayed for non-printable characters.

Sample of what I want to see (via UNICODE) for 4 hex, 4 symbols, 4 numbers and 4 alphabetic: enter image description here

like image 914
brewmanz Avatar asked Oct 19 '25 02:10

brewmanz


1 Answers

No.

There was a proposal for "Hex Byte Pictures for Unicode" proposed by the kermit developers. According to their standards page that proposal was rejected.

like image 66
textshell Avatar answered Oct 21 '25 18:10

textshell



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!