Can hexadecimal content be displayed as ASCII characters in vim?
天蓬老师
天蓬老师 2017-05-16 16:38:46
0
2
650

I have a data log file, which is hexadecimal characters and uses spaces as delimiters:

48 54 54 50 2F 31 2E 31 20 34 30 34 20 4E 6F 74 20 46 6F 75 6E 64 0D 0A 53 65 72 76 65 72 3A 20 6E 67 69 6E 78 2F 31 2E 37 2E 39 0D 0A 44 61 74 65 3A 20 53 75 6E 2C 20 30 36 20 53 65 70 20 32 30 31 35 20 30 33 3A 30 35 3A 30 37 20 47 4D 54 0D
.. ..

The actual content is an HTTP response message. Can it be displayed as ASCII characters in vim? Just like in wireshark:

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(2)
某草草

Sorry, I misunderstood your question at first. Assume that your vim storage is as shown above
Execute

:%!xxd -r -ps
:%!xxd

Then it is the format you have below

滿天的星座

:%!xxd is converted to hexadecimal and displayed in the mode you mentioned
:%!xxd -r is returned to the previous display mode
I haven’t used it for a long time. Give it a try

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!