用法
- 3.1. 编辑文件
- 3.2. 保存文件
- 3.3. To Revert to the Last Saved Version of a File
- 3.4. 在文件中查找数据
- 3.5. 要执行高级查找
- 3.6. To Add Search Criteria
- 3.7. To Remove Search Criteria
- 3.8. 在文件中查找和替换数据
- 3.9. 添加或删除文件的附加视图
- 3.10. 要更改数据组类型
- 3.11. 将 GHex 显示导出为 HTML
- 3.12. 查看字符表
- 3.13. 查看数据转换
- 3.14. 要显示或隐藏类型转换对话框
- 3.15. 打印文件
3.1. 编辑文件
要编辑文件,请执行以下步骤:
-
单击文件的十六进制或 ASCII 视图。光标处于活动状态的视图会显示完整的光标。光标处于不活动状态的视图会显示光标的轮廓。
-
使用以下任意方法可以在文件中移动光标:
- 使用窗口上的滚动条或键盘上的箭头键卷动浏览该文件。
- 选择 ,以十进制或十六进制值的形式键入光标偏移量,然后单击 。十六进制值的格式必须是 0x 后面跟着偏移量,例如 0x3。
-
按照与编辑普通文本文件相同的方式编辑 ASCII 格式。使用 0 到 9 和 a 到 f 的值来编辑十六进制格式。
To insert data and not overwrite existing data, choose
.To cut, copy, and paste data, choose
, , and .To undo an edit, choose Maximum number of undo levels setting in the 第4.1节 ― 编辑 tabbed section of the Preferences dialog.
. To redo an edit, choose . The number of previous edits that you can undo is determined by the3.3. To Revert to the Last Saved Version of a File
To revert to the last version of the current file that you saved and undo all of the edits that you made to the file since you last saved the file, choose Question dialog.
, then click in the3.4. 在文件中查找数据
要在文件中搜索十六进制或 ASCII 字符串,请执行以下步骤:
-
选择
。 -
在"查找数据"对话框中,选择以下选项之一:
- 搜索十六进制数据
- 搜索 ASCII 数据
-
键入要查找的字符串。
-
单击
以查找下一个出现的该字符串。 -
单击
以查找前一个出现的该字符串。 -
点击 Find Data 对话框。
按钮关闭
3.5. 要执行高级查找
要执行高级查找,请执行以下步骤:
- 选择 。
- In the Find Data dialog, select the required search criteria. For information about how to add new search criteria, see 第3.6节 ― To Add Search Criteria.
- 单击 以查找下一个出现的该字符串。
- 单击 以查找前一个出现的该字符串。
- 点击 查找数据 对话框。 关闭
3.6. To Add Search Criteria
To add search criteria, perform the following steps:
-
选择
。 -
在查找数据对话框中,点击 。
-
In the Find Data: Add Search dialog, choose one of the following options:
- 搜索十六进制数据
- 搜索 ASCII 数据
-
键入要查找的字符串。
-
Use the color wheel or the spin boxes to select a color to highlight the search criteria.
-
单击
。 -
点击 Find Data 对话框。
按钮关闭
3.7. To Remove Search Criteria
To remove search criteria, perform the following steps:
- 选择 。
- In the Find Data dialog, select the search criteria that you want to remove.
- 单击 。
- 点击 Find Data 对话框。 按钮关闭
3.8. 在文件中查找和替换数据
要在文件中搜索十六进制或 ASCII 字符串并替换该字符串,请执行以下步骤:
-
选择
。 -
在"查找并替换数据"对话框中,选择以下选项之一:
- 替换十六进制数据
- 替换 ASCII 数据
-
在第一个文本框中,键入要查找的字符串。
-
在第二个文本框中,键入用于替换所查找字符串的字符串。
-
单击
。 -
单击
会替换当前找到的字符串,或单击 来替换找到的所有字符串。 -
Click Find & Replace Data dialog.
to close the
3.9. 添加或删除文件的附加视图
To add another view of the current file to your GHex window, choose .
要删除当前文件的视图,请选择
。 如果您删除了最后一个打开的视图,应用程序将会退出。3.10. 要更改数据组类型
To change how GHex displays the hexadecimal content of a file in the GHex window, choose , then select one of the following menu items:
- 字节 - 单个字节
- 字 - 两个字节的组。
- 长字 - 四个字节的组。
3.11. 将 GHex 显示导出为 HTML
要将包含在 GHex 窗口中的数据导出为 HTML,请选择 。选择一个目录并为该 HTML 文件指定一个文件名,然后单击 。GHex 会执行以下操作:
- 为 GHex 窗口中显示的每个数据页面创建一个单独的 HTML 文件。
- 使用您指定的 HTML 文件名作为文件名的基础。
- 在文件名后附加一个页码以区分这些文件。
3.13. 查看数据转换
要显示二进制、十进制、十六进制和 ASCII 转换(最多四个字节的数据),可执行以下步骤:
-
选择
。 -
执行以下一种操作:
- 在"基本转换器"对话框的其中一个字段中键入要转换的数据,然后按下回车键。
- 要在当前文件的光标位置处显示该数据的转换值,请单击 按钮。
GHex 会更新其它字段的值,以显示数据转换的结果。
-
点击 进制转换 对话框。
关闭
3.14. 要显示或隐藏类型转换对话框
To show or hide the type conversion dialog, choose
.The type conversion dialog displays the value of the selected character in the following representations:
- 有符号 8 位
- 无符号 8 位
- 有符号 16 位
- 无符号 16 位
- 有符号 32 位
- 无符号 32 位
- 32 位浮点
- 64 位浮点
- 十六进制
- 八进制
- 二进制
- 流长度
类型转换对话框包含如下选项:
- 显示小端解码
-
选择此选项显示小端解码。
- 以十六进制显示无符号整数和浮点数
-
Select this option to show unsigned and float numbers as hexadecimal numbers.