[File] [PATCH] of Magdir/wordprocessors for Corel WordPerfect Writing Tools *.CBT *.CBD

Jörg Jenderek joerg.jen.der.ek at gmx.net
Sat Aug 6 14:44:09 UTC 2022


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

some days ago i send patches for DOS COM executables. One Syslinux
COMboot variant use file name extension CBT instead of COM.

For control reason i look for other files with CBT extension on my
systems.
But there are dozen of such CBT files which are part of Corel
WordPerfect Office suite. These are found in sub directory
WritingTools inside WordPerfect program directory "c:\Program Files
(x86)\Corel\WordPerfect Office 2021". The file names are like:
Wt13cbede.cbt Wt13cbeit.cbt Wt13cbefr.cbt WT21cbede.cbt Wt13cbeEN.CBD
WT21cbeEN.CBD. These start with 2 letter phrase WT followed by digits
which corresponds to Word Perfect version. For version 2021 this
digits are 21 and for an older version i found digits 13. The last
capitals obviously correspond to used language. For English the file
name extension is CBD whereas for all other languages it is CBT.

In the sub directory there exist more similar files but with other
file name extensions like adv, hyd, icr, lex, mor and sav. The
Writing Tools are used for spelling, grammar correction, thesaurus
purpose in chosen language. Unfortunately i do not found for which
part the CBT files are used. So i choose a "general" name for such
CBT samples like "Writing Tools".

When running file command (version 5.42) on such examples and related
files i get an output like:

WT21cbeEN.CBD: Corel WordPerfect: Unknown filetype 70, v1.0
Wt13cbeEN.CBD: Corel WordPerfect: Unknown filetype 70, v1.0
WT21cbede.cbt: Corel WordPerfect: Unknown filetype 70, v1.0
WT21cbeit.cbt: Corel WordPerfect: Unknown filetype 70, v1.0
Wt13cbeaf.cbt: Corel WordPerfect: Unknown filetype 70, v1.0
Wt13cbede.cbt: Corel WordPerfect: Unknown filetype 70, v1.0
Wt13cbedk.cbt: Corel WordPerfect: Unknown filetype 70, v1.0
Wt13cbees.cbt: Corel WordPerfect: Unknown filetype 70, v1.0
Wt13cbefr.cbt: Corel WordPerfect: Unknown filetype 70, v1.0
Wt13cbeit.cbt: Corel WordPerfect: Unknown filetype 70, v1.0
Wt13cbekd.cbt: Corel WordPerfect: Unknown filetype 70, v1.0
Wt13cbenl.cbt: Corel WordPerfect: Unknown filetype 70, v1.0
Wt13cbeno.cbt: Corel WordPerfect: Unknown filetype 70, v1.0
Wt13cbepo.cbt: Corel WordPerfect: Unknown filetype 70, v1.0
Wt13cbesv.cbt: Corel WordPerfect: Unknown filetype 70, v1.0

With --extension option only ??? is displayed. Furthermore with -i
option for my samples only generic application/octet-stream is shown.

For comparison reason i also run the file format identification
utility DROID ( See https://sourceforge.net/projects/droid/). This
identifies all such examples wrong as "Comic Book Archive" by PUID
fmt/1462 based on file name extension (See appended
droid-wordperfect-cbt.csv.gz)

For comparison reason i run the file format identification utility
TrID ( See https://mark0.net/soft-trid-e.html). This identifies all
such examples with low rate as "WordPerfect (generic)" by
wp-generic.trid.xml. And most examples are described with high rate
as "WordPerfect Writing Tools data" by cbt-wp.trid.xml (See appended
trid-wordperfect-cbt.txt.gz)

Unfortunately i found no information especially about file format
specification for such WordPerfect CBT files. TrID list the used
file name extension and often with -v option the related URL pointing
to some information. This is expressed by comment lines inside
Magdir/wordprocessors like:
# URL:		https://en.wikipedia.org/wiki/WordPerfect
# Reference:	https://github.com/OneWingedShark/WordPerfect/
#		blob/master/doc/SDK_Help/FileFormats/
#		WPFF_DocumentStructure.htm
#		http://mark0.net/download/triddefs_xml.7z
#		defs/w/wp-generic.trid.xml
# 		defs/c/cbt-wp.trid.xml

The description happens inside Magdir/wordprocessors by starting like
:
 0	string	\xffWPC
So we see that the first 4 bytes are the generic magic for all
WordPerfect samples. By bytes at offset 8 and 9 sub classification is
done. If sub class is not known as last step the sub class is shown
by line like:
 >>>9	byte	x	Corel WordPerfect: Unknown filetype %d
So for my CBT examples i must insert before lines like:
 >>9	byte	70	WordPerfect Writing Tools
 !:mime	application/x-wordperfect-cbt
 !:ext	cbd/cbt
Instead of generic mime type application/octet-stream i show an user
defined one.

After applying the above mentioned modifications by patch
file-5.42-wordprocessors-cbt.diff then i get a more precise output
like:
WT21cbede.cbt: WordPerfect Writing Tools, v1.0
WT21cbeit.cbt: WordPerfect Writing Tools, v1.0
Wt13cbeaf.cbt: WordPerfect Writing Tools, v1.0
Wt13cbede.cbt: WordPerfect Writing Tools, v1.0
Wt13cbedk.cbt: WordPerfect Writing Tools, v1.0
Wt13cbees.cbt: WordPerfect Writing Tools, v1.0
Wt13cbefr.cbt: WordPerfect Writing Tools, v1.0
Wt13cbeit.cbt: WordPerfect Writing Tools, v1.0
Wt13cbekd.cbt: WordPerfect Writing Tools, v1.0
Wt13cbenl.cbt: WordPerfect Writing Tools, v1.0
Wt13cbeno.cbt: WordPerfect Writing Tools, v1.0
Wt13cbepo.cbt: WordPerfect Writing Tools, v1.0
Wt13cbesv.cbt: WordPerfect Writing Tools, v1.0
WT21cbeEN.CBD: WordPerfect Writing Tools, v1.0
Wt13cbeEN.CBD: WordPerfect Writing Tools, v1.0

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

With best wishes
Jörg Jenderek
- --
Jörg Jenderek















-----BEGIN PGP SIGNATURE-----
Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/

iF0EARECAB0WIQS5/qNWKD4ASGOJGL+v8rHJQhrU1gUCYu5+OQAKCRCv8rHJQhrU
1nVqAKCD5wQl6USB+azcGsnSOVTw8uzcaQCdEcvi13Fu+0zoISBZfV8Pqh3Iqjo=
=2FVI
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: trid-wordperfect-cbt.txt.gz
Type: application/x-gzip
Size: 870 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20220806/3d632b37/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: droid-cbt-wordperfect.csv.gz
Type: application/x-gzip
Size: 531 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20220806/3d632b37/attachment-0001.bin>
-------------- next part --------------
--- file-5.42/magic/Magdir/wordprocessors.old	2021-12-06 16:25:22.000000000 +0100
+++ file-5.42/magic/Magdir/wordprocessors	2022-08-06 15:21:15.335304200 +0200
@@ -57,6 +57,13 @@
 >>9	byte	44	WordPerfect 3.5 document
 >>9	byte	45	WordPerfect 4.2 document
 >>9	byte	69	WordPerfect dialog file
+# From:		Joerg Jenderek
+# Note:		found in sub directory WritingTools inside WordPerfect 2021 program directory
+>>9	byte	70	WordPerfect Writing Tools
+#!:mime	application/octet-stream
+!:mime	application/x-wordperfect-cbt
+# like: Wt13cbede.cbt Wt13cbeit.cbt Wt13cbefr.cbt WT21cbede.cbt Wt13cbeEN.CBD WT21cbeEN.CBD
+!:ext	cbd/cbt
 >>9	byte	76	WordPerfect button bar
 >>9	default x
 >>>9	byte	x	Corel WordPerfect: Unknown filetype %d
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file-5.42-wordprocessors-cbt.diff.sig
Type: application/octet-stream
Size: 554 bytes
Desc: not available
URL: <https://mailman.astron.com/pipermail/file/attachments/20220806/3d632b37/attachment.obj>


More information about the File mailing list