[File] [PATCH] Magdir/windows MS Windows help Full Text Search index *.FTS versus *.FTG
Christos Zoulas
christos at zoulas.com
Sun Jan 14 17:54:25 UTC 2024
Committed, thanks!
christos
> On Jan 9, 2024, at 12:09 PM, Jörg Jenderek (GMX) <joerg.jen.der.ek at gmx.net> wrote:
>
> Hello,
>
> some days ago i handled files in context of old Window help system.
> So in this session i will handle files with suffix FTS and FTG.
> The files are typically found in same directory as corresponding HLP
> file. The samples are created by Microsoft Help tool winhlp32.exe.
>
> When i run file command version 5.45 on such samples i get a output like:
> GCC.FTS: MS Windows help Full Text Search index for
> "C:\TMP.TMP\hlp\GCC.HLP"
> Guide.FTS: MS Windows help Full Text Search index for
> "C:\PROGRAMME\IPHOTO PLUS 4\PROGRAMS\Guide.hlp"
> WNBACKUP.FTS: MS Windows help Full Text Search index for
> "C:\TMP.TMP\hlp\WNBACKUP.HLP"
> creatr32.FTS: MS Windows help Full Text Search index for
> "C:\CDCREATR\creatr32.hlp"
> htmhlp98.FTS: MS Windows help Full Text Search index for
> "C:\TMP.TMP\hlp\htmhlp98.hlp"
> hypertrm.FTS: MS Windows help Full Text Search index for
> "C:\TMP.TMP\hlp\hypertrm.hlp"
> msconfig.FTS: MS Windows help Full Text Search index for
> "C:\TMP.TMP\hlp\msconfig.hlp"
> putty.FTS: MS Windows help Full Text Search index for
> "C:\TMP.TMP\hlp\putty.hlp"
> winhlp32.FTG: data
>
> With option --extension for Full Text Search index samples correct 3
> byte sequence FTS is shown and with -i option application/x-winhelp-fts
> is shown. The FTG samples (like winhlp32.FTG.GID) are not recognized and
> therefore described with generic application/octet-stream mime type as
> "data" and 3byte suffix ???.
>
> For comparison reason i also run the file format identification utility
> DROID (See https://sourceforge.net/projects/droid/). Here the samples
> are not recognized.
>
> For comparison reason i run the file format identification utility
> TrID ( See https://mark0.net/soft-trid-e.html). This identifies also
> all FTS examples as "Windows Help Full-Text Search index" with
> application/x-winhelp-fts mime type by fts-winhelp.trid.xml. The FTG
> sample winhlp32.FTG is described as "Windows Help Full-Text search
> Group" with application/x-winhelp-ftg mime type by ftg-winhelp.trid.xml
> (See appended trid-ftg-v.txt.gz).
>
> This tool list the used file name extension and with -v option the
> related URL pointing to used file format information. Luckily i found
> on the net information parts about Windows HELP. Of course no official
> from Microsoft. And this applies also to related search files with
> suffix FTS and FTG. So i choose page on Wikipedia. So i use this as
> reference. That informations are expressed by comment lines inside
> Magdir/windows like:
> # URL: https://en.wikipedia.org/wiki/WinHelp
> # Reference: http://mark0.net/download/triddefs_xml.7z
> # defs/f/fts.trid.xml
> # defs/f/ftg-winhelp.trid.xml
>
> The FTS samples are described by lines inside Magdir/windows which looks
> like:
> 0 string tfMR MS Windows help Full Text Search index
> !:mime application/x-winhelp-fts
> !:ext fts
> >16 string >\0 for "%s"
> By the last line the full path of corresponding MS Windows help file is
> shown like:
> "C:\CDCREATR\creatr32.hlp"
> "C:\PROGRAMME\IPHOTO PLUS 4\PROGRAMS\Guide.hlp"
>
> On Wikipedia beside FTS suffix also FTG is listed as Full Text Search of
> WinHelp. So i looked on my systems for such files. Unfortunately i found
> only few samples. Many (like CTRLREF.FTG SETUPWIZ.FTG) are empty. So
> file size is 0, but many (like CTRLREF.FTG SETUPWIZ.FTG) contain just an
> empty line (Carriage Return Line-Feed). So file size is 2. So in the end
> i got only one real sample (like winhlp32.FTG).
>
> So when translating the TrID patterns into magic lines and comparing
> with FTS patterns this now becomes like:
> 0 string gfMR MS Windows help Full Text search Group
> !:mime application/x-winhelp-ftg
> !:ext ftg
> >16 string >\0 for "%s"
> In the starting 4 byte pattern letter g no instead of t is used compared
> with FTS. When searching on the net for difference then the phrase group
> is mentioned. At offset 16 here also full file name is stored but here
> instead of HLP FTS is referenced ( like "C:\Windows\Help\winhlp32.FTS")
> Instead of generic application/octet-stream i also show a similar user
> defined mime type.
>
> After applying the above mentioned modifications by patch
> file-5.45-windows-ftg.diff then also FTG inspected examples
> are now described. This now looks like:
>
> GCC.FTS: MS Windows help Full Text Search index for
> "C:\TMP.TMP\hlp\GCC.HLP"
> Guide.FTS: MS Windows help Full Text Search index for
> "C:\PROGRAMME\IPHOTO PLUS 4\PROGRAMS\Guide.hlp"
> WNBACKUP.FTS: MS Windows help Full Text Search index for
> "C:\TMP.TMP\hlp\WNBACKUP.HLP"
> creatr32.FTS: MS Windows help Full Text Search index for
> "C:\CDCREATR\creatr32.hlp"
> htmhlp98.FTS: MS Windows help Full Text Search index for
> "C:\TMP.TMP\hlp\htmhlp98.hlp"
> hypertrm.FTS: MS Windows help Full Text Search index for
> "C:\TMP.TMP\hlp\hypertrm.hlp"
> msconfig.FTS: MS Windows help Full Text Search index for
> "C:\TMP.TMP\hlp\msconfig.hlp"
> putty.FTS: MS Windows help Full Text Search index for
> "C:\TMP.TMP\hlp\putty.hlp"
> winhlp32.FTG: MS Windows help Full Text search Group for
> "C:\Windows\Help\winhlp32.FTS"
>
> I hope my diff file can be applied in future version of file
> utility.
>
> Unfortunately some of the corresponding HLP files are not recognized
> correctly. I will try to handle this in a future session.
>
> With best wishes,
> Jörg Jenderek
> --
> Jörg Jenderek
> <trid-ftg-v.txt.gz><file-5_45-windows-ftg_diff.DEFANGED-1><file-5_45-windows-ftg_diff_sig.DEFANGED-2>--
> File mailing list
> File at astron.com
> https://mailman.astron.com/mailman/listinfo/file
> <sanitizer.log>
More information about the File
mailing list