Notepad++查看二进制文件

ps:如果不行,看我另一篇教程https://blog.csdn.net/wuyiyong8023/article/details/99111280

看了很多网上的教程,使用Notepad++查看二进制文件,尝试以后发现和现在的版本不一样,没法正常使用。

自己经过尝试发现了现在能够使用的方法,在当前最新版本下可以正常使用。版本号应该是7.几,没注意看。

点击插件,然后点击 Converter这个插件,这个插件就是查看二进制数据的插件

Notepad++查看二进制文件_第1张图片

点击Edit Configuration File,回答开一个converter.ini文件,用于配置查看二进制文件的

Notepad++查看二进制文件_第2张图片

其中

insertSpace=0 是设置每个byte之间插入空格数目,建议设置为1,方便查看
uppercase=1 设置16进制时(a-f)按大写还是小写显示,1是大写显示,0是小写显示
nbCharPerLine=16设置一行显示的字节数,默认16个字节。

; This section contains the paremters for command ASCII -> Hex
; If you modify directly this file, please restart your Notepad++ to take effect.
; * insertSpace: this parameter allows you to insert a white space between the generated hex codes. Set the value to 1 to enable it, 0 otherwise.
; * uppercase: this parameter allows you to make a-f in UPPERCASE (ie. A-F). Set the value to 1 to enable it , 0 otherwise.
; * nbCharPerLine:this parameter allows you to break line. The value you set is the number of ascii character per line. Set the value from 0 to whatever you want.
[ascii2Hex]
insertSpace=0 
uppercase=1
nbCharPerLine=16

使用说明,通过这个插件可以把ASCII码转为16进制显示,也可以把16进制转为ASCII显示

新建一个文档,内容填充为hello word

Notepad++查看二进制文件_第3张图片

当前状态是按ASCII码正常显示的,首先全选所有文字,然后依次点击插件 > Converter > ASCII->HEX就把hello word转化为了16进制显示

Notepad++查看二进制文件_第4张图片

十六进制转ASCII码显示也类似,首先全选16进制码,然后依次点击: 插件 > Converter > HEX->ASCII就把上图中的16进制码转化为了ASCII码显示。

Notepad++现在好像是默认安装这个插件的,如果没有,可以点击 插件 > 插件管理 ,然后查找这个插件,勾选后,安装

Notepad++查看二进制文件_第5张图片

使用Notepad++查看二进制文件,只需要把文件使用Notepad++打开,此时应该显示的是乱码,不用担心,因为默认是按照ASCII解析显示的,只需要ctrl+a, 全选文件内容,然后依次点击插件 > Converter > ASCII->HEX,就能够按二进制查看文件内容了。

 

你可能感兴趣的:(Notepad++查看二进制文件)