I have stumbled upon a strange text file in an archive of an old dos game downloaded from some abandonware site.
The text file is named WHY_NOT.TXT
. I assume the file is some sort of .NFO file from the group of people who ... um ... 'liberated' the game.
I had not much luck viewing the file using cat or less or even nfoview.
The question is: how can I view the content of the file as intended?
Output from nfoview:
Here is the output of cat and less. I use screenshots because I fear the encoding will get messed up more by the browser and the internets.
Output of file:
$ file WHY_NOT.TXT
WHY_NOT.TXT: ISO-8859 text, with CRLF line terminators, with escape sequences
Here is the file in raw hex dump created using xxd -p WHY_NOT.TXT
:
1b5b34306d0d0a1b5b33396d1b5b34306d0d0a1b5b33396d1b5b34431b5b
303b33346ddb1b5b316ddbdfdfdfdfdfdf201b5b303b33346ddb1b5b316d
dbdfdfdfdfdfdb201b5b34346d201b5b34306ddbdfdfdfdfdfdb201b5b30
3b33346ddb1b5b316ddbdfdfdbdfdfdb201b5b303b33346ddb1b5b316ddb
1b5b36431b5b34346d201b5b34306ddbdfdfdfdfdfdb201b5b303b33346d
db1b5b316ddbdfdfdb201b5b303b33346ddb1b5b316ddb201b5b303b3334
6ddb1b5b316ddbdfdfdfdfdfdc0d0a202020201b5b303b33346ddb1b5b31
6ddbdcdcdcdcdcdc201b5b303b33346ddb1b5b316ddbdcdcdcdc1b5b3434
6ddc1b5b34306ddb201b5b34346d201b5b34306ddbdcdcdcdc1b5b34346d
dc1b5b34306ddb201b5b303b33346ddb1b5b316ddb201b5b303b33346ddb
1b5b316ddb201b5b303b33346ddb1b5b316ddb201b5b303b33346ddb1b5b
316ddb1b5b36431b5b34346d201b5b34306ddbdcdcdcdc1b5b34346ddc1b
5b34306ddb201b5b303b33346ddb1b5b316ddb201b5b303b33346ddb1b5b
316ddb201b5b303b33346ddb1b5b316ddb201b5b303b33346ddb1b5b316d
db202020201b5b303b33346ddb1b5b316ddb0d0a1b5b3130431b5b303b33
346ddc1b5b316ddb201b5b303b33346ddb1b5b316ddb1b5b37431b5b3434
6d201b5b34306ddb202020201b5b303b33346ddc1b5b316ddb201b5b303b
33346ddb1b5b316ddb202020201b5b303b33346ddb1b5b316ddb201b5b30
3b33346ddb1b5b316ddb1b5b36431b5b34346d201b5b34306ddb20202020
1b5b303b33346ddc1b5b316ddb201b5b303b33346ddb1b5b316ddb201b5b
303b33346ddb1b5b316ddb201b5b303b33346ddb1b5b316ddb201b5b303b
33346ddb1b5b316ddb202020201b5b303b33346ddb1b5b316ddb0d0a2020
20201b5b303b33346ddc1b5b316ddcdcdcdcdc1b5b34346ddc1b5b34306d
db201b5b303b33346ddb1b5b316ddb1b5b37431b5b34346d201b5b34306d
db202020201b5b34346d201b5b34306ddb201b5b303b33346ddb1b5b316d
db202020201b5b303b33346ddb1b5b316ddb201b5b303b33346ddb1b5b31
6ddbdcdcdcdcdc201b5b34346d201b5b34306ddb202020201b5b34346d20
1b5b34306ddb201b5b303b33346ddb1b5b316ddb201b5b303b33346ddb1b
5b316ddbdc1b5b34346ddc1b5b34306ddb201b5b303b33346ddb1b5b316d
dbdcdcdcdc1b5b34346ddc1b5b34306ddf0d0a1b5b306d1b5b323535440d
0a
You can recreate the original file by copying that string to a file and then use xxd -r -p filename
. Here is the md5sum to be really sure that you have the identical original file: e64665b3f6e5fb3ec71c8fbf6cc63875
file
heuristic gets the character set completely wrong, somewhat unsurprisingly, given that it's not really text, anyway. – tripleee Feb 03 '13 at 07:27