I want to display the hex byte sequence for the character under the cursor as it is actually stored on disk.
Currently my status line contains
0x%04.5B which works fine for ASCII/latin1 files but for utf-8 it only gives me the Unicode code point which is not what is actually stored on disk.
For example for the german letter
Ä it shows
0x00C4 which corresponds to Unicode character
U+00C4. But the actual UTF-8 encoding is
I also know about
g8 but don't know how to use their output in the status line.
What I want to achieve:
utf-8files show the output of
g8in the status line
latin1files show the
Hex ...part of
gain the status line