TXT files

H

Huh?

Hi,
Does any one here know the file signature for .txt files?
or know where i can go to learn more about file
signatures?
 
D

David Candy

Can you explain why you are asking and what you think it is. The words file signatures and text file are not usually found in the same sentence. While they can have them they don't normally.
 
G

Guest

I want to add a new file type to the existing list of
file types in Ontrack EasyRecovery software but don't
know how to comply with there requirements. I want to add
the .txt extension.

Their requirements/instruction:
The following information is needed for custom file
signatures. Enter the signature in hexadecimal format
with a maximum of 8 bytes. (i.e. 1A 00 00 03 00 00 14 00).
The signature offset should be zero relative and less
than 512 bytes.

Have Input for:
Signature <--Hexadecimal
Offset <--Hexadecimal
Description
and Extension

-----Original Message-----
Can you explain why you are asking and what you think it
is. The words file signatures and text file are not
usually found in the same sentence. While they can have
them they don't normally.message news:[email protected]...
 
D

David Candy

If I understand this correctly (and windows uses this if it doesn't recognise the extension as well - HKEY_CLASSES_ROOT\FileType key contain pattern matching data) you can't do this for most text files.

It relies on there being a fixed pattern of bytes, with one exception, a text file is exactly what it looks like in notepad. If every text document started with the word "The" you could match this - but text files tend to have different text in them (obviously). A exe, dll, ocx all start with MZ (the initials of the programmer that developed the Dos exe format - all windows executables include a dos program before the windows program in the file - run a win prog in Dos - the message comes from the Dos part of the program not from the OS) so you can match to that.

The one exception is unicode text files which start with a 2 byte header that specifies the language of the file. You could pattern match on that. For me it's 255,254 character codes (use edit to view the text file in binary mode edit /70 filename.txt to see - bottom right corner for the code). Unicode specs are here http://www.unicode.org/. Windows XP makes unicode files by default but works seemlessly with either.


-
 
H

Huh?

Thank you David, I wish there was more people like you in
this world. =)
-----Original Message-----
If I understand this correctly (and windows uses this if
it doesn't recognise the extension as well -
HKEY_CLASSES_ROOT\FileType key contain pattern matching
data) you can't do this for most text files.
It relies on there being a fixed pattern of bytes, with
one exception, a text file is exactly what it looks like
in notepad. If every text document started with the
word "The" you could match this - but text files tend to
have different text in them (obviously). A exe, dll, ocx
all start with MZ (the initials of the programmer that
developed the Dos exe format - all windows executables
include a dos program before the windows program in the
file - run a win prog in Dos - the message comes from the
Dos part of the program not from the OS) so you can match
to that.
The one exception is unicode text files which start with
a 2 byte header that specifies the language of the file.
You could pattern match on that. For me it's 255,254
character codes (use edit to view the text file in binary
mode edit /70 filename.txt to see - bottom right corner
for the code). Unicode specs are here
http://www.unicode.org/. Windows XP makes unicode files
by default but works seemlessly with either.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top