[File] [PATCH] Magdir/frame FrameMaker Dictionary; mime type and extension

Jörg Jenderek (GMX) joerg.jen.der.ek at gmx.net
Wed Dec 6 21:27:12 UTC 2023


Hello,

some days ago i must handles some old software samples from Adobe
Framemaker. One file sort are dictionaries.

So i look on my systems for such files. When running file command
version 5.45 on such dictionaries i get an output like:

hyphens.brt: FrameMaker Dictionary text (2.0), ASCII text
hyphens.eng: FrameMaker Dictionary text (2.0), ASCII text
site.dict:   FrameMaker Dictionary text (2.0), ASCII text

With option --extension only 3 byte sequence ??? is shown and with -i
option application/x-mif is shown.

For comparison reason i run the file format identification utility
TrID ( See https://mark0.net/soft-trid-e.html). My  samples are
described as "FrameMaker hyphens dictionary (v2.0)" by
fm-hyph-dict-20.trid.xml. Samples with version 3.0 are described as
"FrameMaker hyphens dictionary (v3.0)" by fm-hyph-dict-30.trid.xml. Here
generic application/octet-stream mime type is shown. For file name
suffix is written, that extension is a 3 letters country code (See
appended trid-v-dict.txt.gz).

For comparison reason i also run the file format identification
utility DROID ( See https://sourceforge.net/projects/droid/). This
identifies no examples.

On Linux according to shared MIME-info database such samples are called
"Adobe FrameMaker document". Here application/vnd.framemaker is used as
mime type and file name suffix fm is used. The samples are just
recognized by looking for 16 byte sequence <MakerDictionary at the
beginning. That information can be seen in source freedesktop.org.xml.in
found for example on gitlab.freedesktop.org.

That informations are expressed by comment line inside Magdir/frame like:
# Reference:	http://mark0.net/download/triddefs_xml.7z
#		defs/f/fm-hyph-dict-30.trid.xml
#		defs/f/fm-hyph-dict-20.trid.xml

The description happens by lines inside Magdir/frame  like:
0	search/1	\<MakerDictionary FrameMaker Dictionary text
!:mime	application/x-mif
 >17	string		3.0		 (3.0)
 >17	string		2.0		 (2.0)
 >17	string		1.0		 (1.x)

So this now starts like:
0	search/1	\<MakerDictionary FrameMaker Dictionary text
!:mime	application/vnd.framemaker
!:ext	dict/eng/brt

Instead of user defined application/x-mif now show officially registered
mime type from IANA organization that is used by shared mime database.
The file name suffix is dict (like in site.dict) but often extension is
a 3 letters country code (like in hyphens.brt hyphens.eng).

Yes this registered type exist, but when reading that on iana.org it is
a disappointment and a shame for a big company like adobe. Neither file
name suffix nor characteristic byte sequences are listed. The entry is
dated from 1996 and non existing ftp.frame.com server is listed as
reference.

The computer companies are like the money banks. Too big to fail or to
be regulated and having too many lobby people trying to avoid rules and
regulations. I am also angry with your political elite like European
union. So we have hundreds of computer companies storing files on my
personal computer without any public rules. But for me as single person
i must check my car every 2 years and are forbidden to buy old light
bulbs and vacuum cleaners with thousand of Watts.
So apparently some are more equal than others without any reasons. That
will lead in the end of current public society.

After applying the above mentioned modifications by patch
file-5.45-frame-dict.diff then all my inspected FrameMaker Dictionary
are still described but now also file name suffix are shown with
--extension option. This now  looks like:

hyphens.brt: dict/eng/brt
hyphens.eng: dict/eng/brt
site.dict:   dict/eng/brt

I hope my diff file can be applied in future version of file
utility.

With best wishes,
Jörg Jenderek
--
Jörg Jenderek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trid-v-dict.txt.gz
Type: application/x-gzip
Size: 402 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20231206/0865f77e/attachment.bin>
-------------- next part --------------
--- file-5.45/magic/Magdir/frame.old	2021-02-23 01:49:24.000000000 +0100
+++ file-5.45/magic/Magdir/frame	2023-12-06 22:14:13.214363800 +0100
@@ -38,5 +38,15 @@
 >>&0	string		x		"%s"
+# Update:	Joerg Jenderek
+# Note:		called "Adobe FrameMaker document" by shared MIME-info database from freedesktop.org
 0	search/1	\<MakerDictionary	FrameMaker Dictionary text
-!:mime	application/x-mif
+#!:mime	text/plain
+#!:mime	application/x-mif
+!:mime	application/vnd.framemaker
+# like site.dict but often extension is a 3 letters country code like in: hyphens.brt hyphens.eng
+!:ext	dict/eng/brt
+# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/f/fm-hyph-dict-30.trid.xml
+# Note:		called "FrameMaker hyphens dictionary (v3.0)" by TrID
 >17	string		3.0		 (3.0)
+# Reference:	http://mark0.net/download/triddefs_xml.7z/defs/f/fm-hyph-dict-20.trid.xml
+# Note:		called "FrameMaker hyphens dictionary (v2.0)" by TrID
 >17	string		2.0		 (2.0)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file-5.45-frame-dict.diff.sig
Type: application/octet-stream
Size: 643 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20231206/0865f77e/attachment.obj>


More information about the File mailing list