我有一些包含书籍章节的二进制文件(这些文件没有扩展名)是否有任何软件可以让我访问其中的内容?换句话说,将二进制转换为英文?
我尝试了几种解决方案...
谢谢
最佳答案
对于非常“基本”的尝试,
首先,尝试:
file the_file
查看它是否是已知格式。然后相应地重命名文件并使用适当的程序打开它。
如果失败,您可以使用非常低级别的方法:
string the_file > the_strings_of_the_file
创建一个新文件 (the_strings_of_the_file),其中包含来自 the_file 的“字符串”。
它可能被无意义的东西弄得乱七八糟,而且(几个?)句子可能以任何顺序排列......
您可以尝试使用一些过滤器来缩小可能好的范围:
string the_file | grep some_regexp > the_strings_of_the_file.filtered_in
string the_file | grep -v some_regexp > the_strings_of_the_file.filtered_out
并调整 some_regexp 直到“filtered_out”不包含任何有值(value)的东西...
(如果您向我们提供一些“字符串”的输出,包括有意义的和一些无意义的,我可以帮助处理正则表达式)
(并且如果您确切知道使用了哪种语言:ascii?重音字母?等)
另一种方法:删除“无用”字母:
tr -cd ' -~\n\t' the_file > the_file_without_weird_letters
# note that if your file contain accentuated letters, you'll need to change the range.
# The range above is good for "everything printable in regular ascii"
关于linux - 是否有任何软件可以让我在 Windows 中读取文本二进制文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19937301/